Skip to content

Commit 835faa3

Browse files
authored
Merge branch 'main' into niharikag09/otel-url-template-resource-name
2 parents d0e9877 + fec92d8 commit 835faa3

424 files changed

Lines changed: 76410 additions & 3721 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ common:windows --repo_env=PIP_CACHE_DIR # https://pip.pypa.io/en/stable/topics/c
8181
common:windows --repo_env=SYSTEMDRIVE # needed by vswhere to locate the VS installer instance database
8282
common:windows --repo_env=SYSTEMROOT # used by COM to load system DLLs, needed by vswhere
8383
common:windows --repo_env=USERPROFILE # used by MSYS2 bash to emulate HOME, needed by git to fetch repositories
84-
common:windows --repo_env=VSTUDIO_ROOT # visual_studio(path_variable) in MODULE.bazel; MSBuild-only
8584
common:windows --run_env=__COMPAT_LAYER=RunAsInvoker # install*.exe may otherwise fail claiming unneeded admin elevation
8685
common:windows --test_env=__COMPAT_LAYER=RunAsInvoker # same, for bazel test
8786
common:windows --shell_executable=C:/tools/msys64/usr/bin/bash.exe
@@ -109,6 +108,7 @@ common:ci --config=adms
109108
common:ci --config=lint
110109
common:ci --noexperimental_convenience_symlinks # not CI-suitable: "These symlinks are only for the user's convenience"
111110
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
112112

113113
# Project/Language configs --------------------------------------------------------------------------------------
114114
import %workspace%/bazel/configs/go_tests.bazelrc

.gitattributes

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
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+
# The test that uses this file needs adjustment to not rely on autocrlf
18+
bazel/tools/tar_checksums/testdata/expected_checksums.txt -eol
19+
120
# Set batch file line endings to CRLF so that they can be executed on Windows
221
*.bat text eol=crlf
322
*.cmd text eol=crlf
423
*.bin binary
524

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
1325
go.sum -diff -merge linguist-generated=true
1426
# Merge changelog entries without conflicts when multiple PRs add lines simultaneously
1527
CHANGELOG-AIX.md merge=union
@@ -22,19 +34,6 @@ CHANGELOG-AIX.md merge=union
2234
pkg/config/schema/*.yaml text eol=lf
2335
pkg/security/probe/constantfetch/btfhub/constants.json -diff -merge linguist-generated=true
2436
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
3837

3938
# Fix `git diff` when running on the below file formats.
4039
# 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

.gitlab/build/binary_build/fakeintake.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ fakeintake_check_version_bump:
2323
needs: []
2424
image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
2525
tags: ["arch:amd64", "specific:true"]
26+
variables:
27+
GIT_DEPTH: 0 # Full history: fakeintake.check-version-bump uses merge-base
2628
script:
2729
- dda inv -- fakeintake.check-version-bump

0 commit comments

Comments
 (0)