Skip to content

Commit 887c557

Browse files
authored
Merge branch 'main' into noueman/fix-cf-vm-dca-nil-panic
2 parents 5836295 + 5fcb9f9 commit 887c557

378 files changed

Lines changed: 75034 additions & 3361 deletions

File tree

Some content is hidden

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

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ common:ci --config=adms
108108
common:ci --config=lint
109109
common:ci --noexperimental_convenience_symlinks # not CI-suitable: "These symlinks are only for the user's convenience"
110110
common:ci --remote_download_regex=.*/test\.xml$ # force-download test.xml even under --remote_download_outputs=toplevel, so junit collection can read it locally
111+
common:ci --remote_download_regex=.*/test\.log$ # force-download test.log for test2json postprocessing
111112

112113
# Project/Language configs --------------------------------------------------------------------------------------
113114
import %workspace%/bazel/configs/go_tests.bazelrc

.devcontainer/datadog/default/features/datadog-agent/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
set -euo pipefail
33
featureDir=$(cd "$(dirname "$0")"; pwd)
44

5-
# Get claude from the buildimages /root/.local/bin
6-
# cp /root/.local/bin/claude /home/bits/.local/bin/claude
5+
# Install tailscale so workspace devcontainers can connect to the Headscale
6+
# overlay network and reach agent-sandbox private VMs
7+
curl -fsSL https://tailscale.com/install.sh | sh
78

89
# Add bits user to the docker group. This should probably be handled by the base feature. But not working for now.
910
usermod -aG docker bits

.gitattributes

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1+
# Default to LF for all files that git identifies as text files, regardless of platform
2+
* text=auto eol=lf
3+
4+
# TODO(alopezz): These exceptions, matching files that are stored with CRLF endings in
5+
# git, are transitional while migrating to LF as the default eol for all text files.
6+
*.ps1 -text
7+
Dockerfiles/agent/windows/amd64/Dockerfile -text
8+
cmd/ai_prompt_logger/Cargo.toml -text
9+
cmd/ai_prompt_logger/src/main.rs -text
10+
cmd/trace-agent/test/testsuite/testdata/trace_with_rates.json -text
11+
comp/core/gui/impl/views/private/images/datadog_icon_white.svg -text
12+
deps/msodbcsql18/LICENSE.txt -text
13+
devenv/answer_files/**/*.xml -text
14+
pkg/collector/corechecks/containers/kubelet/testdata/summary.json -text
15+
releasenotes/notes/*.yaml -text
16+
tasks/unit_tests/testdata/secret.tar.gz/*.xml -text
17+
118
# Set batch file line endings to CRLF so that they can be executed on Windows
219
*.bat text eol=crlf
320
*.cmd text eol=crlf
421
*.bin binary
522

6-
# Set go source line endings to LF on all platforms so gofmt can be used
7-
*.go text=auto eol=lf
8-
# Same for gopatch (does not handle CRLF line endings)
9-
*.gopatch text eol=lf
10-
# Same for go workspace files (root and testdata)
11-
*go.work text eol=lf
12-
go.mod text eol=lf
1323
go.sum -diff -merge linguist-generated=true
1424
# Merge changelog entries without conflicts when multiple PRs add lines simultaneously
1525
CHANGELOG-AIX.md merge=union
@@ -22,19 +32,6 @@ CHANGELOG-AIX.md merge=union
2232
pkg/config/schema/*.yaml text eol=lf
2333
pkg/security/probe/constantfetch/btfhub/constants.json -diff -merge linguist-generated=true
2434
pkg/security/seclwin/** -diff -merge linguist-generated=true
25-
# CWS doc JSON is generated as LF on Linux; force LF on Windows too
26-
# so Bazel's byte-exact diff_test doesn't trip on core.autocrlf-rewritten CRLF.
27-
docs/cloud-workload-security/** text eol=lf
28-
# Fixtures should have LF line endings because they are checked against OCI packages built on Linux
29-
pkg/fleet/installer/fixtures/** text=auto eol=lf
30-
31-
# Bazel writes LF; force LF on Windows too to avoid autocrlf churn after `bazel run` / `dda inv tidy`
32-
*.bazel text eol=lf
33-
*.bzl text eol=lf
34-
MODULE.bazel.lock text eol=lf
35-
36-
# Use LF for python files that need to pass Bazel's byte-exact diff_test
37-
tasks/core_checks.py text eol=lf
3835

3936
# Fix `git diff` when running on the below file formats.
4037
# Our windows build image uses MinGit which tries to use the astextplain diff algorithm (https://git-scm.com/docs/gitattributes#_setting_the_internal_diff_algorithm).

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@
645645
/pkg/config/schema/yaml/compliance_config.yaml @DataDog/agent-cspm @DataDog/agent-security @DataDog/fleet-automation
646646
/pkg/config/schema/yaml/container_image.yaml @DataDog/container-integrations @DataDog/fleet-automation
647647
/pkg/config/schema/yaml/container_lifecycle.yaml @DataDog/container-integrations @DataDog/fleet-automation
648+
/pkg/config/schema/yaml/network_devices.yaml @DataDog/network-device-monitoring-core @DataDog/fleet-automation
648649
/pkg/config/schema/yaml/external_metrics_provider.yaml @DataDog/container-autoscaling @DataDog/fleet-automation
649650
/pkg/config/schema/yaml/gpu.yaml @DataDog/ebpf-platform @DataDog/gpu-monitoring-agent @DataDog/fleet-automation
650651
/pkg/config/schema/yaml/internal_profiling.yaml @DataDog/agent-runtimes @DataDog/fleet-automation
@@ -918,12 +919,12 @@
918919
/tasks/unit_tests/build_tags_tests.py @DataDog/agent-build
919920
/tasks/unit_tests/libs/build/ @DataDog/agent-build
920921
/tasks/unit_tests/omnibus_tests.py @DataDog/agent-build
921-
/tasks/unit_tests/schema_* @DataDog/agent-configuration
922+
/tasks/unit_tests/schema_* @DataDog/fleet-automation
922923
/tasks/unit_tests/testdata/components_src/ @DataDog/agent-runtimes
923924
/tasks/unit_tests/testdata/collector/ @DataDog/opentelemetry-agent
924925
/tasks/unit_tests/experimental_gates_tests.py @DataDog/agent-build
925926
/tasks/unit_tests/static_quality_gates/ @DataDog/agent-build
926-
/tasks/unit_tests/testdata/schema_codegen/ @DataDog/agent-configuration
927+
/tasks/unit_tests/testdata/schema_codegen/ @DataDog/fleet-automation
927928
/tasks/installer.py @DataDog/fleet
928929
/tasks/host_profiler.py @DataDog/opentelemetry-agent @DataDog/profiling-full-host
929930
/test/ @DataDog/agent-devx

.github/workflows/upgrade-python-patch-version.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373
Upgrades the Agent's embedded Python interpreter from **${{ steps.update.outputs.current_version }}** to **${{ steps.update.outputs.new_version }}** (patch version update).
7474
7575
### Changes
76-
- Updated `omnibus/config/software/python3.rb` with new version and SHA256
7776
- Updated `deps/cpython/cpython.MODULE.bazel` with new version and SHA256
7877
- Updated `test/new-e2e/tests/agent-platform/common/agent_behaviour.go` with expected version
7978
- Updated `packaging/aix/lib/env.sh` with new version

.gitlab-ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ default:
174174
max: 1 # Retry everything once on failure
175175
when: always
176176

177+
# Full git history. Override the default shallow clone.
178+
.needs_full_git_history:
179+
variables:
180+
GIT_DEPTH: 0
181+
177182
stages:
178183
- .pre
179184
- setup
@@ -375,8 +380,9 @@ variables:
375380
DD_PKG_GITLAB_URL: "https://artifact-gateway.us1.ddbuild.io/internal/artifact-gateway/api/v4"
376381
PIPELINE_KEY_ALIAS: "alias/ci_datadog-agent_pipeline-key"
377382

378-
# Job cloning strategy
383+
# Shallow clone by default.
379384
GIT_STRATEGY: "fetch"
385+
GIT_DEPTH: 1
380386
DISABLE_GIT_CACHE: true
381387

382388
# Job stage attempts (see https://docs.gitlab.com/ee/ci/runners/configure_runners.html#job-stages-attempts)

.gitlab/.pre/ci_configuration.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ test_gitlab_compare_to:
1515
image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
1616
tags: ["arch:amd64"]
1717
extends: .dd_octo_sts
18+
variables:
19+
GIT_DEPTH: 0 # Full history: gitlab_configuration_is_modified uses merge-base and HEAD^
1820
rules:
1921
- !reference [.except_mergequeue]
2022
- !reference [.on_gitlab_changes]
@@ -30,6 +32,8 @@ compute_gitlab_ci_config:
3032
stage: .pre
3133
needs: []
3234
tags: ["arch:arm64"]
35+
variables:
36+
GIT_DEPTH: 0 # Full history: computes gitlab-ci config diff against merge-base
3337
before_script:
3438
# Get main history
3539
- git fetch origin main
@@ -57,5 +61,7 @@ lint_github_actions_shellcheck:
5761
compare_to: $COMPARE_TO_BRANCH
5862
when: on_success
5963
allow_failure: true
64+
variables:
65+
GIT_DEPTH: 0 # Full history: linter.github-actions-shellcheck uses git merge-base
6066
script:
6167
- dda inv -- -e linter.github-actions-shellcheck

.gitlab/.pre/common/prebuild-workspace-image.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ prebuild-workspace-image-check:
99
paths:
1010
- .devcontainer/datadog/default/**/*
1111
compare_to: $COMPARE_TO_BRANCH
12+
variables:
13+
GIT_DEPTH: 0 # Full history: three-dot diff is from merge-base to HEAD
1214
script:
15+
- git fetch origin "$COMPARE_TO_BRANCH"
16+
- export SOURCE_REF="origin/$COMPARE_TO_BRANCH"
1317
- bash tools/prebuild-devcontainer-check.sh

.gitlab/.pre/setup/setup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ setup_agent_version:
2323
dotenv: build.env
2424
variables:
2525
DISABLE_GIT_CACHE: true
26+
GIT_DEPTH: 0 # git describe --tags needs reachable tags

.gitlab/build/bazel/test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,19 @@
1414
aud: ci-identities
1515
variables:
1616
EXTERNAL_LINKS_PATH: external_links_$CI_JOB_ID.json
17-
FLAVOR: base
18-
BEP_FILE: $CI_PROJECT_DIR/bazel-bep-$FLAVOR.json
17+
BEP_FILE: $CI_PROJECT_DIR/bazel-bep.json
18+
RESULT_JSON: test_output.json
1919
after_script:
20-
- dda inv -- -e bazel.collect-junit --flavor=$FLAVOR --output-tgz=junit-${CI_JOB_NAME}.tgz --bep-file=$BEP_FILE || true
20+
- dda inv -- -e bazel.process-test-results --bep-file=$BEP_FILE --junit-tar=junit-${CI_JOB_NAME}.tgz --result-json=$RESULT_JSON
2121
- !reference [.upload_junit_source]
2222
artifacts:
2323
expire_in: 2 weeks
2424
when: always
2525
paths:
26+
- $RESULT_JSON
27+
- test_output_unified.json
2628
- junit-*.tgz
27-
- bazel-bep-*.json
29+
- bazel-bep.json
2830
reports:
2931
annotations:
3032
- $EXTERNAL_LINKS_PATH
@@ -42,8 +44,10 @@ bazel:coverage:linux-amd64:
4244
- cp "$(bazel info output_path)/_coverage/_coverage_report.dat" "$CI_PROJECT_DIR/coverage-bazel-$CI_JOB_NAME_SLUG.out"
4345
artifacts:
4446
paths:
47+
- $RESULT_JSON
48+
- test_output_unified.json
4549
- junit-*.tgz
46-
- bazel-bep-*.json
50+
- bazel-bep.json
4751
- coverage-bazel-*.out
4852
variables:
4953
KUBERNETES_CPU_REQUEST: 16
@@ -81,8 +85,10 @@ bazel:test:macos-arm64:
8185
- !reference [.bazel:test:reporting, after_script]
8286
artifacts:
8387
paths:
88+
- $RESULT_JSON
89+
- test_output_unified.json
8490
- junit-*.tgz
85-
- bazel-bep-*.json
91+
- bazel-bep.json
8692
- bazel-exec.log
8793

8894
# Windows splits the build from the Go tests, unlike the other platforms: the

0 commit comments

Comments
 (0)