Skip to content

Commit e935cbe

Browse files
authored
Merge branch 'main' into kfairise/granular-rules-install-tests
2 parents e47bbee + 0134072 commit e935cbe

File tree

98 files changed

+2413
-3155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2413
-3155
lines changed

.adms/bazel/adms.mirror.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ rewrite (registry.npmjs.org)/(.*) depot-read-api-bzl.us1.ddbuild.io/$1/$2
126126
# TODO: Move to Depot Java when we can determine why requests to repo1.maven.org
127127
# are still being made.
128128
rewrite (repo1.maven.org)/(.*) depot-read-api-bzl.us1.ddbuild.io/$1/$2
129+
rewrite (central.sonatype.com)/(.*) depot-read-api-bzl.us1.ddbuild.io/$1/$2
129130

130131
# TODO: We don't support Rust in ADMS yet, but once we do, this can go away. In
131132
# the meantime, it's a kind of "back door" to mirroring Rust artifacts internally.

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ build:ci --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
6363
build:ci --output_groups=+rustfmt_checks
6464

6565
# Project configs --------------------------------------------------------------------------------------
66-
import %workspace%/bazel/configs/sdagent_rc
66+
import %workspace%/bazel/configs/sdagent.bazelrc
6767

6868
# Local development options --------------------------------------------------------------------------------------------
6969
try-import %workspace%/user.bazelrc

.claude/skills/create-pr/SKILL.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: create-pr
3+
description: Create a pull request for the current branch with proper labels and description
4+
disable-model-invocation: true
5+
allowed-tools: Bash, Read, Glob
6+
argument-hint: "[--real] [additional labels...]"
7+
---
8+
9+
Create a pull request for the current branch following the Datadog Agent contributing guidelines.
10+
11+
## Instructions
12+
13+
1. **Check the current branch** and ensure it's not `main`
14+
2. **Get the commits** on this branch compared to `main` using `git log main..HEAD`
15+
3. **Get the diff** using `git diff main..HEAD` to understand all changes
16+
4. **Read the PR template** from `.github/PULL_REQUEST_TEMPLATE.md`
17+
5. **Push the branch** to origin if needed
18+
6. **Open the PR**: By default, open as **Draft** using `gh pr create --draft`. If `$ARGUMENTS` contains `--real`, open as a regular (non-draft) PR instead (omit the `--draft` flag). Remove `--real` from `$ARGUMENTS` before processing remaining arguments as labels.
19+
7. **PR title**: Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) format, prefixed with the general area of change. Examples:
20+
- `fix(e2e): Fix flaky diagnose test`
21+
- `feat(logs): Add new log pipeline`
22+
- `refactor(config): Simplify endpoint resolution`
23+
8. **Labels**: Choose appropriate labels (plus any additional labels passed as $ARGUMENTS):
24+
- If the PR only changes tests, docs, CI config, or developer tooling (no Agent binary code changes), use `changelog/no-changelog` and `qa/no-code-change`
25+
- If the PR changes Agent binary code and QA was done, use `qa/done`
26+
- If the PR changes Agent binary code, a reno release note is expected (remind the user)
27+
- Add `backport/<branch-name>` if the user asks for a backport
28+
9. **PR body**: Fill in the PR template sections:
29+
- **What does this PR do?**: A clear description of what is changed. Must be readable independently, tying back to the changed code.
30+
- **Motivation**: A reason why the change is made. Point to an issue if applicable. Include drawbacks or tradeoffs if any.
31+
- **Describe how you validated your changes**: How you validated the change (tests added/run, benchmarks, manual testing). Only needed when testing included work not covered by test suites.
32+
- **Additional Notes**: Any extra context, links to predecessor PRs if part of a chain, notes that make code understanding easier.
33+
34+
## PR Description Guidelines (from CONTRIBUTING.md)
35+
36+
The PR description should incorporate everything reviewers and future maintainers need:
37+
- A description of what is changed
38+
- A reason why the change is made (pointing to an issue is a good reason)
39+
- When testing had to include work not covered by test suites, a description of how you validated your change
40+
- Any relevant benchmarks
41+
- Additional notes that make code understanding easier
42+
- If part of a chain of PRs, point to the predecessors
43+
- If there are drawbacks or tradeoffs, raise them
44+
45+
## Example
46+
47+
```bash
48+
gh pr create --draft \
49+
--title "fix(e2e): Fix flaky diagnose test by adding missing fakeintake redirect" \
50+
--label "changelog/no-changelog" \
51+
--label "qa/no-code-change" \
52+
--body "$(cat <<'EOF'
53+
### What does this PR do?
54+
55+
<description of changes>
56+
57+
### Motivation
58+
59+
<why this change is needed>
60+
61+
### Describe how you validated your changes
62+
63+
<testing done>
64+
65+
### Additional Notes
66+
67+
<any extra context>
68+
EOF
69+
)"
70+
```
71+
72+
## Usage
73+
74+
- `/create-pr` — creates a draft PR (default)
75+
- `/create-pr --real` — creates a non-draft PR
76+
- `/create-pr --real team/my-team` — non-draft PR with an extra label
77+
78+
## Output
79+
80+
Return the PR URL when done.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/.adms/ @DataDog/agent-build
2727
/.bazel* @DataDog/agent-build
2828
/bazel/ @DataDog/agent-build
29-
/bazel/configs/sdagent_rc @DataDog/agent-discovery
29+
/bazel/configs/sdagent.bazelrc @DataDog/agent-discovery
3030
/MODULE.bazel* @DataDog/agent-build
3131
# Temporary during Bazel migration
3232
/**/BUILD.bazel @DataDog/agent-build

.github/workflows/update_dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ jobs:
6767
### Describe how you validated your changes
6868
CI is considered enough to validate changes.
6969
team-reviewers: agent-runtimes
70-
labels: team/agent-runtimes,qa/done,changelog/no-changelog,ask-review
70+
labels: team/agent-runtimes,qa/done,changelog/no-changelog

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ workflow:
375375
- <<: *if_triggered_pipeline
376376
- <<: *if_main_branch
377377
variables:
378+
BAZEL_CACHE_POLICY_SUFFIX: "-push"
378379
GO_TEST_SKIP_FLAKE: "false"
379380
- <<: *if_release_branch
380381
- <<: *if_deploy

.gitlab/build/bazel/defs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
paths:
1414
- .cache/bazelisk
1515
- .cache/bazel/*/install
16-
policy: pull-push
16+
policy: pull$BAZEL_CACHE_POLICY_SUFFIX
1717
when: on_success
1818
- &bazel_cache
1919
key: bazel-$CI_RUNNER_DESCRIPTION
2020
paths:
2121
- .cache/bazel/*/cache
2222
- .cache/pip
23-
policy: pull-push
23+
policy: pull$BAZEL_CACHE_POLICY_SUFFIX
2424
when: on_success
2525
variables:
2626
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"

.gitlab/build/bazel/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ bazel:tests:linux-amd64:
88
extends: [ .bazel:tests, .bazel:runner:linux-amd64 ]
99
script:
1010
- bazel test //bazel/tests/...
11+
- bazel build //packages/agent/linux:debian
1112

1213
bazel:tests:linux-arm64:
1314
extends: [ .bazel:tests, .bazel:runner:linux-arm64 ]

.gitlab/test/integration_test/otel.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,28 @@ docker_image_build_otel:
5858
- !reference [.except_mergequeue]
5959
- when: on_success
6060

61-
datadog_otel_components_ocb_build:
62-
stage: integration_test
63-
image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
64-
tags: ["arch:amd64", "specific:true"]
65-
needs: ["go_deps"]
66-
artifacts:
67-
paths:
68-
- ocb-output.log
69-
- otelcol-custom.log
70-
- flare-info.log
71-
when: always
72-
before_script:
73-
- !reference [.retrieve_linux_go_deps]
74-
script:
75-
- echo "Building custom collector with datadog components"
76-
- test/otel/testdata/ocb_build_script.sh
77-
- echo "see artifacts for job logs"
78-
rules:
79-
- !reference [.except_mergequeue]
80-
- when: on_success
81-
timeout: 15 minutes
61+
# TODO(songy23): re-enable datadog_otel_components_ocb_build after OSS DD exporter adopts https://github.com/DataDog/datadog-agent/pull/42542
62+
# datadog_otel_components_ocb_build:
63+
# stage: integration_test
64+
# image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
65+
# tags: ["arch:amd64", "specific:true"]
66+
# needs: ["go_deps"]
67+
# artifacts:
68+
# paths:
69+
# - ocb-output.log
70+
# - otelcol-custom.log
71+
# - flare-info.log
72+
# when: always
73+
# before_script:
74+
# - !reference [.retrieve_linux_go_deps]
75+
# script:
76+
# - echo "Building custom collector with datadog components"
77+
# - test/otel/testdata/ocb_build_script.sh
78+
# - echo "see artifacts for job logs"
79+
# rules:
80+
# - !reference [.except_mergequeue]
81+
# - when: on_success
82+
# timeout: 15 minutes
8283

8384
# Test that the BYOC packages can be built with the existing Dockerfile
8485
ddot_byoc_package_build_test_rpm:

.vscode/settings.json.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"go.buildTags": "{build_tags}",
33
"go.testTags": "{build_tags}",
44
"go.lintTool": "golangci-lint",
5+
"go.buildFlags": ["-buildvcs=false"],
56
"go.lintFlags": [
67
"--build-tags",
78
"{build_tags}"

0 commit comments

Comments
 (0)