Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into mwdd146980/port-confl…
Browse files Browse the repository at this point in the history
…ict-windows
  • Loading branch information
mwdd146980 committed Aug 30, 2024
2 parents ef40577 + e5723f8 commit 823bf4a
Show file tree
Hide file tree
Showing 878 changed files with 13,522 additions and 7,719 deletions.
1 change: 1 addition & 0 deletions .copyright-overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ github.com/chrusty/protoc-gen-jsonschema: Copyright (c) 2017 The Authors
github.com/antchfx/htmlquery: Copyright (c) 2016 Zheng Chun
github.com/antchfx/xmlquery: Copyright (c) 2016 Zheng Chun
github.com/antchfx/xpath: Copyright (c) 2016 Zheng Chun
github.com/kouhin/envflag: Copyright (c) 2015 kouhin


# The Copyright information is not contained in the LICENSE file, but it can be found in other
Expand Down
11 changes: 10 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,14 @@

/.gitlab/kitchen_* @DataDog/agent-delivery
/.gitlab/kitchen_testing/windows.yml @DataDog/agent-delivery @DataDog/windows-agent
/.gitlab/kitchen_testing/new-e2e_testing/windows.yml @DataDog/agent-delivery @DataDog/windows-agent
/.gitlab/e2e_install_packages/windows.yml @DataDog/agent-delivery @DataDog/windows-agent

/.gitlab/common/ @DataDog/agent-devx-infra
/.gitlab/common/test_infra_version.yml @DataDog/agent-devx-loops @DataDog/agent-devx-infra

/.gitlab/e2e/e2e.yml @DataDog/container-integrations @DataDog/agent-devx-loops
/.gitlab/e2e/k8s_e2e.yml @DataDog/container-integrations @DataDog/agent-devx-loops
/.gitlab/e2e/install_packages @DataDog/agent-delivery
/.gitlab/container_build/fakeintake.yml @DataDog/agent-e2e-testing @DataDog/agent-devx-loops
/.gitlab/binary_build/fakeintake.yml @DataDog/agent-e2e-testing @DataDog/agent-devx-loops

Expand All @@ -106,6 +108,9 @@
/.gitlab/functional_test_cleanup.yml @DataDog/agent-security @DataDog/windows-kernel-integrations @DataDog/agent-devx-infra
/.gitlab/functional_test/system_probe_windows.yml @DataDog/agent-devx-infra @DataDog/windows-kernel-integrations
/.gitlab/functional_test/common.yml @DataDog/agent-devx-infra @DataDog/windows-kernel-integrations
/.gitlab/functional_test/oracle.yml @DataDog/agent-devx-infra @DataDog/database-monitoring


/.gitlab/choco_build/choco_build.yml @DataDog/agent-delivery @DataDog/windows-agent
/.gitlab/choco_deploy/choco_deploy.yml @DataDog/agent-delivery @DataDog/windows-agent

Expand Down Expand Up @@ -198,6 +203,7 @@
/cmd/system-probe/modules/traceroute* @DataDog/network-device-monitoring @Datadog/Networks
/cmd/system-probe/modules/ping* @DataDog/network-device-monitoring
/cmd/system-probe/modules/service_discover* @DataDog/apm-onboarding @DataDog/universal-service-monitoring
/cmd/system-probe/modules/language_detection* @DataDog/processes @DataDog/universal-service-monitoring
/cmd/system-probe/runtime/ @DataDog/agent-security
/cmd/system-probe/windows/ @DataDog/windows-kernel-integrations
/cmd/system-probe/windows_resources/ @DataDog/windows-kernel-integrations
Expand Down Expand Up @@ -295,6 +301,7 @@
/pkg/cli/ @DataDog/agent-shared-components
/pkg/cli/subcommands/clusterchecks @DataDog/container-platform
/pkg/dogstatsd/ @DataDog/agent-metrics-logs
/pkg/discovery/ @DataDog/apm-onboarding @DataDog/universal-service-monitoring
/pkg/errors/ @DataDog/agent-shared-components
/pkg/forwarder/ @DataDog/agent-processing-and-routing
/pkg/gohai @DataDog/agent-shared-components
Expand Down Expand Up @@ -584,6 +591,8 @@
/test/fakeintake/ @DataDog/agent-e2e-testing @DataDog/agent-devx-loops
/test/fakeintake/aggregator/ndmflowAggregator.go @DataDog/network-device-monitoring
/test/fakeintake/aggregator/ndmflowAggregator_test.go @DataDog/network-device-monitoring
/test/fakeintake/aggregator/servicediscoveryAggregator.go @DataDog/apm-onboarding @DataDog/universal-service-monitoring
/test/fakeintake/aggregator/servicediscoveryAggregator_test.go @DataDog/apm-onboarding @DataDog/universal-service-monitoring
/test/new-e2e/ @DataDog/agent-e2e-testing @DataDog/agent-devx-loops
/test/new-e2e/test-infra-definition @DataDog/agent-devx-loops
/test/new-e2e/system-probe @DataDog/ebpf-platform
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/create_rc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.branches.outputs.value }}
warning: ${{ steps.warning.outputs.value }}
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
Expand All @@ -39,8 +40,10 @@ jobs:
echo "value=$(inv release.get-unreleased-release-branches)" >> $GITHUB_OUTPUT
- name: Set the warning option
id: warning
if: github.event.schedule == '0 8 * * 1,3,5'
run: echo "WARNING='-w'" >> $GITHUB_ENV
run: |
echo "value=-w" >> $GITHUB_OUTPUT
create_rc_pr:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,7 +77,7 @@ jobs:
ATLASSIAN_USERNAME: ${{ secrets.ATLASSIAN_USERNAME }}
ATLASSIAN_PASSWORD: ${{ secrets.ATLASSIAN_PASSWORD }}
run: |
echo "CHANGES=$(inv -e release.check-for-changes -r ${{ matrix.value }} ${{ env.WARNING }})" >> $GITHUB_OUTPUT
echo "CHANGES=$(inv -e release.check-for-changes -r ${{ matrix.value }} ${{ needs.find_release_branches.outputs.warning }})" >> $GITHUB_OUTPUT
- name: Create RC PR
if: ${{ steps.check_for_changes.outputs.CHANGES == 'true'}}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/serverless-binary-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,19 @@ jobs:
id: should
run: |
cd go/src/github.com/DataDog/datadog-agent
git fetch origin $GITHUB_BASE_REF
git fetch origin $GITHUB_HEAD_REF
if test $(
git diff $GITHUB_BASE_REF..$GITHUB_SHA --name-only | grep dependencies_linux_amd64.txt
git diff origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF --name-only | grep dependencies_linux_amd64.txt
); then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "dependencies list changed"
elif [[ ${{ steps.compare.outputs.diff }} > env.SIZE_ALLOWANCE ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "binary size changed"
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "nothing changed"
fi
### Steps below run if size diff > SIZE_ALLOWANCE or file dependencies_linux_amd64.txt changed ###
Expand Down
25 changes: 14 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include:
- .gitlab/deps_fetch/deps_fetch.yml
- .gitlab/dev_container_deploy/include.yml
- .gitlab/e2e/e2e.yml
- .gitlab/e2e_k8s/e2e_k8s.yml
- .gitlab/e2e_install_packages/include.yml
- .gitlab/e2e_pre_test/e2e_pre_test.yml
- .gitlab/functional_test/include.yml
- .gitlab/functional_test_cleanup/functional_test_cleanup.yml
Expand Down Expand Up @@ -93,6 +95,8 @@ stages:
- install_script_testing
- e2e_pre_test
- e2e
- e2e_k8s
- e2e_install_packages
- kitchen_cleanup
- functional_test
- functional_test_cleanup
Expand Down Expand Up @@ -206,6 +210,10 @@ variables:
E2E_TESTS_API_KEY_SSM_NAME: ci.datadog-agent.e2e_tests_api_key # agent-devx-loops
E2E_TESTS_APP_KEY_SSM_NAME: ci.datadog-agent.e2e_tests_app_key # agent-devx-loops
E2E_TESTS_RC_KEY_SSM_NAME: ci.datadog-agent.e2e_tests_rc_key # agent-devx-loops
E2E_TESTS_AZURE_CLIENT_ID: ci.datadog-agent.e2e_tests_azure_client_id # agent-devx-loops
E2E_TESTS_AZURE_CLIENT_SECRET: ci.datadog-agent.e2e_tests_azure_client_secret # agent-devx-loops
E2E_TESTS_AZURE_TENANT_ID: ci.datadog-agent.e2e_tests_azure_tenant_id # agent-devx-loops
E2E_TESTS_AZURE_SUBSCRIPTION_ID: ci.datadog-agent.e2e_tests_azure_subscription_id # agent-devx-loops
KITCHEN_EC2_SSH_KEY_SSM_NAME: ci.datadog-agent.aws_ec2_kitchen_ssh_key # agent-devx-loops
KITCHEN_AZURE_CLIENT_ID_SSM_NAME: ci.datadog-agent.azure_kitchen_client_id # agent-devx-loops
KITCHEN_AZURE_CLIENT_SECRET_SSM_NAME: ci.datadog-agent.azure_kitchen_client_secret # agent-devx-loops
Expand Down Expand Up @@ -714,22 +722,12 @@ workflow:
changes:
paths:
- tools/windows/DatadogAgentInstaller/**/*
- .gitlab/kitchen_testing/new-e2e_testing/windows.yml
- .gitlab/e2e_install_packages/windows.yml
- test/new-e2e/tests/windows/install-test/**/*
- test/new-e2e/tests/windows/domain-test/**/*
- tasks/msi.py
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916

.on_windows_installer_changes_or_manual:
- <<: *if_disable_e2e_tests
when: never
- <<: *if_main_branch
- !reference [.except_mergequeue]
- <<: *if_windows_installer_changes
when: on_success
- when: manual
allow_failure: true

.except_windows_installer_changes:
- <<: *if_windows_installer_changes
when: never
Expand Down Expand Up @@ -796,6 +794,11 @@ workflow:
- test/new-e2e/go.mod
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916

.on_e2e_or_windows_installer_changes:
- !reference [.on_e2e_main_release_or_rc]
- <<: *if_windows_installer_changes
when: on_success

.on_e2e_or_fakeintake_changes_or_manual:
- !reference [.on_e2e_main_release_or_rc]
- changes:
Expand Down
1 change: 1 addition & 0 deletions .gitlab/JOBOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ kitchen_*_security_agent* @DataDog/agent-security
kitchen_*_process_agent* @DataDog/processes
cleanup_kitchen_functional_test @DataDog/windows-kernel-integrations @DataDog/agent-security
serverless_cold_start_performance-deb_x64 @DataDog/serverless
oracle* @DataDog/database-monitoring

# E2E
k8s-e2e-* @DataDog/container-integrations
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/common/test_infra_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ variables:
# and check the job creating the image to make sure you have the right SHA prefix
TEST_INFRA_DEFINITIONS_BUILDIMAGES_SUFFIX: ""
# Make sure to update test-infra-definitions version in go.mod as well
TEST_INFRA_DEFINITIONS_BUILDIMAGES: 8aaa61cc1c42
TEST_INFRA_DEFINITIONS_BUILDIMAGES: c0ecdf254c23
115 changes: 35 additions & 80 deletions .gitlab/e2e/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,6 @@
---
# e2e stage
# Contains jobs which runs e2e tests on our Docker images.

.k8s_e2e_template:
stage: e2e
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
dependencies: []
variables:
LANG: C.UTF-8
before_script:
- export DOCKER_REGISTRY_LOGIN=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $DOCKER_REGISTRY_LOGIN_SSM_KEY)
- export DOCKER_REGISTRY_PWD=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $DOCKER_REGISTRY_PWD_SSM_KEY)
- export DD_API_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $API_KEY_DDDEV_SSM_NAME)

.k8s-e2e-cws-cspm-init:
- set +x
- export DATADOG_AGENT_SITE=datadoghq.com
- export DATADOG_AGENT_API_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_API_KEY_SSM_NAME)
- export DATADOG_AGENT_APP_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_APP_KEY_SSM_NAME)
- export DATADOG_AGENT_RC_KEY=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_RC_KEY_SSM_NAME)

.k8s_e2e_template_needs_dev:
extends: .k8s_e2e_template
needs:
- dev_branch_multiarch-a7
- dca_dev_branch

.k8s_e2e_template_dev:
extends: .k8s_e2e_template_needs_dev
script:
- inv -e e2e-tests --agent-image=datadog/agent-dev:${CI_COMMIT_REF_SLUG}-py3 --dca-image=datadog/cluster-agent-dev:${CI_COMMIT_REF_SLUG} --argo-workflow=$ARGO_WORKFLOW

.k8s_e2e_template_dev_with_cws_cspm_init:
extends: .k8s_e2e_template_needs_dev
script:
- !reference [.k8s-e2e-cws-cspm-init]
- inv -e e2e-tests --agent-image=datadog/agent-dev:${CI_COMMIT_REF_SLUG}-py3 --dca-image=datadog/cluster-agent-dev:${CI_COMMIT_REF_SLUG} --argo-workflow=$ARGO_WORKFLOW

.k8s_e2e_template_needs_main:
extends: .k8s_e2e_template
needs:
- dev_master-a7
- dca_dev_master

.k8s_e2e_template_main_with_cws_cspm_init:
extends: .k8s_e2e_template_needs_main
script:
- !reference [.k8s-e2e-cws-cspm-init]
- inv -e e2e-tests --agent-image=datadog/agent-dev:master-py3 --dca-image=datadog/cluster-agent-dev:master --argo-workflow=$ARGO_WORKFLOW

.k8s_e2e_template_main:
extends: .k8s_e2e_template_needs_main
script:
- inv -e e2e-tests --agent-image=datadog/agent-dev:master-py3 --dca-image=datadog/cluster-agent-dev:master --argo-workflow=$ARGO_WORKFLOW

k8s-e2e-cspm-dev:
extends: .k8s_e2e_template_dev_with_cws_cspm_init
rules: !reference [.on_dev_branch_manual]
variables:
ARGO_WORKFLOW: cspm

k8s-e2e-cspm-main:
extends: .k8s_e2e_template_main_with_cws_cspm_init
rules: !reference [.on_main]
retry: 1
variables:
ARGO_WORKFLOW: cspm

k8s-e2e-otlp-dev:
extends: .k8s_e2e_template_dev
rules: !reference [.on_dev_branch_manual]
variables:
ARGO_WORKFLOW: otlp

k8s-e2e-otlp-main:
extends: .k8s_e2e_template_main
rules: !reference [.on_main]
variables:
ARGO_WORKFLOW: otlp
# Contains test jobs based on the new-e2e tests framework

.new_e2e_template:
stage: e2e
Expand All @@ -97,6 +19,12 @@ k8s-e2e-otlp-main:
- touch $E2E_PRIVATE_KEY_PATH && chmod 600 $E2E_PRIVATE_KEY_PATH && $CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $SSH_KEY_RSA_SSM_NAME > $E2E_PRIVATE_KEY_PATH
# Use S3 backend
- pulumi login "s3://dd-pulumi-state?region=us-east-1&awssdk=v2&profile=$AWS_PROFILE"
# Setup Azure credentials. https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#set-configuration-using-pulumi-config
# The app is called `agent-e2e-tests`
- export ARM_CLIENT_ID=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_AZURE_CLIENT_ID)
- export ARM_CLIENT_SECRET=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_AZURE_CLIENT_SECRET)
- export ARM_TENANT_ID=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_AZURE_TENANT_ID)
- export ARM_SUBSCRIPTION_ID=$($CI_PROJECT_DIR/tools/ci/aws_ssm_get_wrapper.sh $E2E_TESTS_AZURE_SUBSCRIPTION_ID)
# Generate external links to CI VISIBILITY, used by artifacts:reports:annotations
- inv -e gitlab.generate-ci-visibility-links --output=$EXTERNAL_LINKS_PATH
variables:
Expand Down Expand Up @@ -167,7 +95,7 @@ new-e2e-containers:
matrix:
# Temporarily disable old version of Kubernetes
# On this version, the reported kubernetes CPU usage appears to be significantly off
# - EXTRA_PARAMS: "--run TestKindSuite -c ddinfra:kubernetesVersion=1.19"
- EXTRA_PARAMS: "--run TestKindSuite -c ddinfra:kubernetesVersion=1.19"
- EXTRA_PARAMS: "--run TestKindSuite -c ddinfra:kubernetesVersion=1.22"
- EXTRA_PARAMS: "--run TestKindSuite -c ddinfra:kubernetesVersion=1.27"
- EXTRA_PARAMS: "--run TestKindSuite -c ddinfra:kubernetesVersion=1.29"
Expand Down Expand Up @@ -454,6 +382,33 @@ new-e2e-otel:
TARGETS: ./tests/otel
TEAM: otel

.new-e2e_package_signing:
variables:
TARGETS: ./tests/agent-platform/package-signing
TEAM: agent-delivery
EXTRA_PARAMS: --osversion $E2E_BRANCH_OSVERS

new-e2e-package-signing-amazonlinux-a6-x86_64:
extends:
- .new_e2e_template
- .new-e2e_amazonlinux_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

new-e2e-package-signing-debian-a7-x86_64:
extends:
- .new_e2e_template
- .new-e2e_debian_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

new-e2e-package-signing-suse-a7-x86_64:
extends:
- .new_e2e_template
- .new-e2e_suse_a7_x86_64
- .new-e2e_package_signing
rules: !reference [.on_default_new_e2e_tests]

generate-flakes-finder-pipeline:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
stage: e2e
Expand Down
Loading

0 comments on commit 823bf4a

Please sign in to comment.