Skip to content

Commit 4e18b73

Browse files
Merge branch 'main' into chore/agent-internal-image-tmpl-v26
2 parents 9977be9 + 87ffb12 commit 4e18b73

119 files changed

Lines changed: 17779 additions & 881 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.

.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).

.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/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

.gitlab/build/binary_build/host_profiler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- dda inv -- -e host-profiler.build
1111
needs: ["go_deps"]
1212
variables:
13+
GIT_DEPTH: 0 # git describe --tags needs reachable tags
1314
KUBERNETES_MEMORY_REQUEST: "16Gi"
1415
KUBERNETES_MEMORY_LIMIT: "16Gi"
1516
artifacts:

.gitlab/build/lint/technical_linters.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ validate_experiment_systemd_units:
8989
lint_releasenotes_rst:
9090
extends: .lint
9191
rules: !reference [.on_releasenotes_changes]
92+
variables:
93+
GIT_DEPTH: 0 # Full history: linter.rst-releasenotes --only-changed uses merge-base
9294
script:
9395
- dda inv -- -e linter.rst-releasenotes --only-changed
9496

.gitlab/build/pkg_metrics/pkg_metrics.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,7 @@ check_pkg_size:
102102
- dogstatsd_deb-arm64
103103
- agent_rpm-arm64-a7
104104
- iot_agent_rpm-arm64
105+
variables:
106+
GIT_DEPTH: 0 # Full history: package.check-size uses git merge-base
105107
script:
106108
- dda inv -- package.check-size

.gitlab/build/source_test/ebpf.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ prepare_sysprobe_ebpf_functional_tests_x64:
102102
KUBERNETES_CPU_REQUEST: 4
103103
KUBERNETES_MEMORY_REQUEST: "12Gi"
104104
KUBERNETES_MEMORY_LIMIT: "12Gi"
105+
GIT_DEPTH: 0 # Full history: kmt.prepare embeds git merge-base in the testsuite binary
105106
artifacts:
106107
when: always
107108
paths:

0 commit comments

Comments
 (0)