Skip to content

Commit

Permalink
Merge branch 'main' into use-telemetry-component-for-autodiscovery-co…
Browse files Browse the repository at this point in the history
…mponent
  • Loading branch information
GustavoCaso committed Jul 26, 2024
2 parents 8bb4d77 + 190d7b8 commit 1d0674d
Show file tree
Hide file tree
Showing 706 changed files with 10,795 additions and 4,238 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
/cmd/agent/dist/conf.d/jetson.d/ @DataDog/agent-devx-infra
/cmd/agent/dist/conf.d/oracle.d/ @DataDog/database-monitoring
/cmd/agent/dist/conf.d/oracle-dbm.d/ @DataDog/database-monitoring
/cmd/agent/dist/conf.d/network_path.d/ @DataDog/Networks @DataDog/network-device-monitoring
/cmd/agent/dist/conf.d/sbom.d/ @DataDog/container-integrations
/cmd/agent/dist/conf.d/snmp.d/ @DataDog/network-device-monitoring
/cmd/agent/dist/conf.d/win32_event_log.d/ @DataDog/windows-agent
Expand Down Expand Up @@ -207,6 +208,7 @@
/Dockerfiles/agent/entrypoint.d.windows/ @DataDog/container-integrations @DataDog/windows-agent
/Dockerfiles/agent/entrypoint.ps1 @DataDog/container-integrations @DataDog/windows-agent
/Dockerfiles/agent/windows/ @DataDog/container-integrations @DataDog/windows-agent
/Dockerfiles/agent-ot/Dockerfile.byoc @DataDog/opentelemetry

/docs/ @DataDog/documentation @DataDog/agent-devx-loops
/docs/dev/checks/ @DataDog/documentation @DataDog/agent-metrics-logs
Expand Down Expand Up @@ -603,6 +605,7 @@
/test/workload-checks/ @DataDog/single-machine-performance

/tools/ @DataDog/agent-devx-loops
/tools/ci @DataDog/agent-devx-infra
/tools/ebpf/ @DataDog/ebpf-platform
/tools/gdb/ @DataDog/agent-shared-components
/tools/go-update/ @DataDog/agent-shared-components
Expand Down
12 changes: 0 additions & 12 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ updates:
- dependencies-go
- team/triage
- changelog/no-changelog
milestone: 22
ignore:
# These dependencies are replaced in the main go.mod file.
# They are ignored since bumping them would have no effect on the build.
Expand Down Expand Up @@ -45,7 +44,6 @@ updates:
- dependencies-go
- team/agent-apm
- changelog/no-changelog
milestone: 22
ignore:
# Ignore internal modules
- dependency-name: github.com/DataDog/datadog-agent/*
Expand All @@ -61,7 +59,6 @@ updates:
- dependencies-go
- team/agent-shared-components
- changelog/no-changelog
milestone: 22
ignore:
# Ignore internal modules
- dependency-name: github.com/DataDog/datadog-agent/*
Expand All @@ -77,7 +74,6 @@ updates:
- dependencies-go
- team/agent-apm
- changelog/no-changelog
milestone: 22
ignore:
# Ignore internal modules
- dependency-name: github.com/DataDog/datadog-agent/*
Expand All @@ -93,7 +89,6 @@ updates:
- dependencies-go
- team/agent-security
- changelog/no-changelog
milestone: 22
ignore:
# Ignore internal modules
- dependency-name: github.com/DataDog/datadog-agent/*
Expand All @@ -113,7 +108,6 @@ updates:
- team/agent-delivery
- changelog/no-changelog
- qa/no-code-change
milestone: 22
schedule:
interval: monthly
open-pull-requests-limit: 100
Expand All @@ -124,7 +118,6 @@ updates:
- dependencies-go
- team/network-device-monitoring
- changelog/no-changelog
milestone: 22
ignore:
# Ignore internal modules
- dependency-name: github.com/DataDog/datadog-agent/*
Expand All @@ -140,7 +133,6 @@ updates:
- changelog/no-changelog
- qa/no-code-change
- dev/testing
milestone: 22
ignore:
# Ignore test-infra-definitions because bumping the GO package inside `go.mod`
# requires to also bump `TEST_INFRA_DEFINITIONS_BUILDIMAGES` inside `.gitlab/common/test_infra_version.yml`
Expand All @@ -162,7 +154,6 @@ updates:
- changelog/no-changelog
- qa/no-code-change
- dev/testing
milestone: 22
schedule:
interval: weekly
open-pull-requests-limit: 100
Expand All @@ -175,7 +166,6 @@ updates:
- changelog/no-changelog
- qa/no-code-change
- dev/tooling
milestone: 22
schedule:
interval: monthly
open-pull-requests-limit: 100
Expand All @@ -187,7 +177,6 @@ updates:
- changelog/no-changelog
- qa/no-code-change
- dev/testing
milestone: 22
schedule:
interval: weekly
open-pull-requests-limit: 100
Expand All @@ -200,7 +189,6 @@ updates:
- changelog/no-changelog
- qa/no-code-change
- dev/tooling
milestone: 22
schedule:
interval: weekly
open-pull-requests-limit: 100
3 changes: 3 additions & 0 deletions .github/workflows/create_rc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:

- name: Check for changes since last RC
id: check_for_changes
env:
ATLASSIAN_USERNAME: ${{ secrets.ATLASSIAN_USERNAME }}
ATLASSIAN_PASSWORD: ${{ secrets.ATLASSIAN_PASSWORD }}
run: |
echo "CHANGES=$(inv -e release.check-for-changes -r ${{ env.RELEASE_BRANCH }} ${{ env.WARNING }})" >> $GITHUB_OUTPUT
Expand Down
42 changes: 23 additions & 19 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ variables:
GITLAB_FULL_API_TOKEN_SSM_NAME: ci.datadog-agent.gitlab_full_api_token # ci-cd
INSTALL_SCRIPT_API_KEY_SSM_NAME: ci.agent-linux-install-script.datadog_api_key_2 # agent-delivery
JIRA_READ_API_TOKEN_SSM_NAME: ci.datadog-agent.jira_read_api_token # agent-devx-infra
AGENT_GITHUB_APP_ID_SSM_NAME: ci.datadog-agent.platform-github-app-id # agent-devx-infra
AGENT_GITHUB_INSTALLATION_ID_SSM_NAME: ci.datadog-agent.platform-github-app-installation-id # agent-devx-infra
AGENT_GITHUB_KEY_SSM_NAME: ci.datadog-agent.platform-github-app-key # agent-devx-infra
MACOS_GITHUB_APP_ID_SSM_NAME: ci.datadog-agent.macos_github_app_id # agent-devx-infra
MACOS_GITHUB_INSTALLATION_ID_SSM_NAME: ci.datadog-agent.macos_github_installation_id # agent-devx-infra
MACOS_GITHUB_KEY_SSM_NAME: ci.datadog-agent.macos_github_key_b64 # agent-devx-infra
Expand Down Expand Up @@ -359,14 +362,12 @@ variables:
.if_mergequeue: &if_mergequeue
if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/

.fakeintake_changes: &fakeintake_changes
changes:
paths:
- "test/fakeintake/**/*"
- .gitlab/binary_build/fakeintake.yml
- .gitlab/container_build/fakeintake.yml
- .gitlab/dev_container_deploy/fakeintake.yml
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916
.fakeintake_paths: &fakeintake_paths
paths:
- "test/fakeintake/**/*"
- .gitlab/binary_build/fakeintake.yml
- .gitlab/container_build/fakeintake.yml
- .gitlab/dev_container_deploy/fakeintake.yml

#
# Workflow rules
Expand Down Expand Up @@ -685,8 +686,8 @@ workflow:
- .gitlab/kernel_matrix_testing/common.yml
- test/new-e2e/system-probe/**/*
- test/new-e2e/scenarios/system-probe/**/*
- test/new-e2e/runner/**/*
- test/new-e2e-utils/**/*
- test/new-e2e/pkg/runner/**/*
- test/new-e2e/pkg/utils/**/*
- test/new-e2e/go.mod
- tasks/security_agent.py
- tasks/kmt.py
Expand All @@ -707,7 +708,7 @@ workflow:
changes:
paths:
- tools/windows/DatadogAgentInstaller/**/*
- .gitlab/new-e2e_testing/windows.yml
- .gitlab/kitchen_testing/new-e2e_testing/windows.yml
- test/new-e2e/tests/windows/install-test/**/*
- test/new-e2e/tests/windows/domain-test/**/*
- tasks/msi.py
Expand Down Expand Up @@ -740,8 +741,8 @@ workflow:
- .gitlab/kernel_matrix_testing/common.yml
- test/new-e2e/system-probe/**/*
- test/new-e2e/scenarios/system-probe/**/*
- test/new-e2e/runner/**/*
- test/new-e2e-utils/**/*
- test/new-e2e/pkg/runner/**/*
- test/new-e2e/pkg/utils/**/*
- test/new-e2e/go.mod
- tasks/system_probe.py
- tasks/kmt.py
Expand Down Expand Up @@ -790,7 +791,9 @@ workflow:

.on_e2e_or_fakeintake_changes_or_manual:
- !reference [.on_e2e_main_release_or_rc]
- <<: *fakeintake_changes
- changes:
<<: *fakeintake_paths
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916
variables:
FAKEINTAKE_IMAGE_OVERRIDE: "public.ecr.aws/datadog/fakeintake:v$CI_COMMIT_SHORT_SHA"
when: on_success
Expand All @@ -815,7 +818,6 @@ workflow:
- pkg/collector/corechecks/containers/**/*
- pkg/collector/corechecks/containerimage/**/*
- pkg/collector/corechecks/containerlifecycle/**/*
- pkg/collector/corechecks/kubernetes/**/*
- pkg/collector/corechecks/sbom/**/*
- pkg/sbom/**/*
- pkg/util/clusteragent/**/*
Expand Down Expand Up @@ -888,13 +890,13 @@ workflow:
- comp/core/agenttelemetry/**/*
- comp/core/autodiscovery/providers/config_reader*.go
- comp/core/autodiscovery/providers/file*.go
- comp/dogstatsd/**/*
- comp/forwarder/**/*
- comp/logs/**/*
- comp/serializer/compression/**/*
- pkg/aggregator/**/*
- pkg/collector/**/*
- pkg/commonchecks/**/*
- pkg/dogstatsd/**/*
- pkg/jmxfetch/**/*
- pkg/logs/**/*
- pkg/metrics/**/*
Expand Down Expand Up @@ -1040,7 +1042,6 @@ workflow:
paths:
- omnibus/**/*
- .gitlab-ci.yml
- .gitlab/package_build.yml
- release.json
- .gitlab/package_build/**/*
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916
Expand All @@ -1053,10 +1054,13 @@ workflow:
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916

.on_fakeintake_changes:
- <<: *fakeintake_changes
- changes:
<<: *fakeintake_paths
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916

.on_fakeintake_changes_on_main:
- <<: *fakeintake_changes
- changes:
<<: *fakeintake_paths
<<: *if_main_branch

.fast_on_dev_branch_only:
Expand Down
17 changes: 16 additions & 1 deletion .gitlab/.pre/test_gitlab_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,19 @@ test_gitlab_configuration:
script:
- source /root/.bashrc
- export GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $GITLAB_FULL_API_TOKEN_SSM_NAME)
- inv linter.gitlab-ci
- inv -e linter.gitlab-ci
- inv -e linter.job-change-path
- inv -e linter.gitlab-change-paths

test_gitlab_compare_to:
stage: .pre
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
rules:
- !reference [.on_gitlab_changes]
script:
- source /root/.bashrc
- export GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $GITLAB_FULL_API_TOKEN_SSM_NAME)
- !reference [.setup_agent_github_app]
- pip install -r tasks/requirements.txt
- inv pipeline.compare-to-itself
6 changes: 6 additions & 0 deletions .gitlab/common/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
echo "Using GitHub App instance 2"
fi
.setup_agent_github_app:
- export GITHUB_KEY_B64=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $AGENT_GITHUB_KEY_SSM_NAME)
- export GITHUB_APP_ID=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $AGENT_GITHUB_APP_ID_SSM_NAME)
- export GITHUB_INSTALLATION_ID=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $AGENT_GITHUB_INSTALLATION_ID_SSM_NAME)
- echo "Using agent GitHub App"

# Install `dd-pkg` and lint packages produced by Omnibus, supports only deb and rpm packages
.lint_linux_packages:
- curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_${DD_PKG_ARCH}.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
Expand Down
3 changes: 3 additions & 0 deletions .gitlab/container_build/docker_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- crane flatten -t ${TARGET_TAG} ${TARGET_TAG}
# Workaround for temporary network failures
retry: 2
timeout: 30m

.docker_build_job_definition_amd64:
extends: .docker_build_job_definition
Expand Down Expand Up @@ -306,6 +307,7 @@ docker_build_dogstatsd_amd64:
variables:
IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent/dogstatsd
BUILD_CONTEXT: Dockerfiles/dogstatsd/alpine
timeout: 20m

# build the dogstatsd image
docker_build_dogstatsd_arm64:
Expand All @@ -319,3 +321,4 @@ docker_build_dogstatsd_arm64:
variables:
IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent/dogstatsd
BUILD_CONTEXT: Dockerfiles/dogstatsd/alpine
timeout: 20m
1 change: 1 addition & 0 deletions .gitlab/container_build/fakeintake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ docker_build_fakeintake:
rules:
- !reference [.except_mergequeue]
- !reference [.on_fakeintake_changes]
- !reference [.on_fakeintake_changes_on_main]
needs: []
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/docker:20.10-py3
tags: ["arch:amd64"]
Expand Down
5 changes: 4 additions & 1 deletion .gitlab/deploy_containers/deploy_containers_a7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ deploy_containers-ot:
rules:
- when: manual
allow_failure: true
variables:
AGENT_REPOSITORY: agent
IMG_REGISTRIES: public
VERSION: 7
dependencies: []
before_script:
- source /root/.bashrc
- export VERSION="$(inv agent.version --major-version 7 --url-safe --pipeline-id $PARENT_PIPELINE_ID)"
parallel:
matrix:
- IMG_SOURCES: ${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta-arm64
Expand Down
3 changes: 3 additions & 0 deletions .gitlab/deploy_packages/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ include:
- export VERSION=$(inv agent.version --url-safe)-1
- git config --global credential.helper '!f() { echo username=x-access-token; echo "password=$GH_TOKEN"; };f'
- ${CI_PROJECT_DIR}/tools/ci/retry.sh git clone -v --depth=1 https://github.com/DataDog/datadog-packages /tmp/datadog-packages
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/"
- export GOPROXY="binaries.ddbuild.io,proxy.golang.org,direct"
- export GONOSUMDB="github.com/DataDog,go.ddbuild.io"
- cd /tmp/datadog-packages/cmd/datadog-package
- go build .
- ./datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:${VERSION} ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
Expand Down
30 changes: 30 additions & 0 deletions .gitlab/deps_fetch/deps_fetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
- mkdir -p $GOPATH/pkg/mod && tar xJf modcache_tools.tar.xz -C $GOPATH/pkg/mod
- rm -f modcache_tools.tar.xz

.retrieve_linux_go_e2e_deps:
- mkdir -p $GOPATH/pkg/mod && tar xJf modcache_e2e.tar.xz -C $GOPATH/pkg/mod
- rm -f modcache_e2e.tar.xz

.cache_policy:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Expand Down Expand Up @@ -76,3 +80,29 @@ go_tools_deps:
paths:
- modcache_tools.tar.xz
retry: 1

go_e2e_deps:
stage: deps_fetch
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
needs: ["setup_agent_version"]
extends: .cache_policy
variables:
KUBERNETES_CPU_REQUEST: 16
script:
- if [ -f modcache_e2e.tar.xz ]; then exit 0; fi
- source /root/.bashrc
- inv -e new-e2e-tests.deps
- cd $GOPATH/pkg/mod/ && tar c -I "pxz -T${KUBERNETES_CPU_REQUEST}" -f $CI_PROJECT_DIR/modcache_e2e.tar.xz .
artifacts:
expire_in: 1 day
paths:
- $CI_PROJECT_DIR/modcache_e2e.tar.xz
cache:
- key:
files:
- ./test/new-e2e/go.mod
prefix: "go_e2e_deps"
paths:
- modcache_e2e.tar.xz
retry: 1
4 changes: 1 addition & 3 deletions .gitlab/dev_container_deploy/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ qa_agent_ot:
extends: .docker_publish_job_definition
stage: dev_container_deploy
rules:
# incident-28463: this job is currently broken
# - !reference [.on_container_or_e2e_changes]
- !reference [.manual]
- !reference [.on_container_or_e2e_changes]
needs:
- docker_build_ot_agent7
- docker_build_ot_agent7_arm64
Expand Down
Loading

0 comments on commit 1d0674d

Please sign in to comment.