Skip to content

Commit

Permalink
Merge branch 'main' into yang.song/otlp-peer-svc
Browse files Browse the repository at this point in the history
  • Loading branch information
songy23 committed Apr 27, 2023
2 parents 7d4dc82 + 79ca82b commit ce2bdb3
Show file tree
Hide file tree
Showing 266 changed files with 4,647 additions and 3,653 deletions.
2 changes: 1 addition & 1 deletion .circleci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ should have it).
Example:
```bash
cd .circleci/images/runner
docker build --platform=linux/amd64 -t datadog/datadog-agent-runner-circle:go1197 .
docker build --platform=linux/amd64 -t datadog/datadog-agent-runner-circle:go1198 .
docker login
docker push datadog/datadog-agent-runner-circle:go1197
```
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ experimental:
templates:
job_template: &job_template
docker:
- image: datadog/datadog-agent-runner-circle:go1197
- image: datadog/datadog-agent-runner-circle:go1198
environment:
USE_SYSTEM_LIBS: "1"
working_directory: /go/src/github.com/DataDog/datadog-agent
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.7
FROM golang:1.19.8

RUN sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list \
&& sed -i 's/^#\s*\(deb.*multiverse\)$/\1/g' /etc/apt/sources.list \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN set -ex \
xz-utils

# Golang
ENV GIMME_GO_VERSION 1.19.7
ENV GIMME_GO_VERSION 1.19.8
ENV GOROOT /root/.gimme/versions/go$GIMME_GO_VERSION.linux.amd64
ENV GOPATH /go
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
/cmd/agent/subcommands/run/internal/clcrunnerapi/ @DataDog/container-integrations @DataDog/agent-shared-components
/cmd/agent/windows @DataDog/windows-agent
/cmd/agent/dist/conf.d/jetson.d @DataDog/agent-platform
/cmd/agent/dist/conf.d/oracle-dbm.d @DataDog/database-monitoring
/cmd/agent/dist/conf.d/snmp.d/ @DataDog/network-device-monitoring
/cmd/agent/dist/conf.d/oracle-dbm.d/conf.yaml.default @DataDog/database-monitoring
/cmd/agent/*.manifest @DataDog/agent-platform
Expand Down
11 changes: 0 additions & 11 deletions .github/codeql_config.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ jobs:
with:
languages: go, javascript, python, cpp
setup-python-dependencies: false
config-file: .github/codeql_config.yml
# Defining a fixed CodeQL bundle version
tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-20211115/codeql-bundle-linux64.tar.gz
tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-20230207/codeql-bundle-linux64.tar.gz

- name: Build DataDog agent
run: |
Expand Down
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ stages:
- dev_container_deploy
- deploy6
- deploy7
- trigger_release
- deploy_dca
- choco_build
- choco_deploy
- internal_image_deploy
- trigger_release
- e2e
- kitchen_cleanup
- functional_test
Expand Down Expand Up @@ -144,17 +144,17 @@ variables:
# To use images from datadog-agent-buildimages dev branches, set the corresponding
# SUFFIX variable to _test_only
DATADOG_AGENT_BUILDIMAGES_SUFFIX: ""
DATADOG_AGENT_BUILDIMAGES: v14189740-26a2d48
DATADOG_AGENT_BUILDIMAGES: v15101851-1eecc1f
DATADOG_AGENT_WINBUILDIMAGES_SUFFIX: ""
DATADOG_AGENT_WINBUILDIMAGES: v14652025-95c0add
DATADOG_AGENT_WINBUILDIMAGES: v15101851-1eecc1f
DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX: ""
DATADOG_AGENT_ARMBUILDIMAGES: v14002862-b2bcfc9
DATADOG_AGENT_ARMBUILDIMAGES: v15101851-1eecc1f
DATADOG_AGENT_SYSPROBE_BUILDIMAGES_SUFFIX: ""
DATADOG_AGENT_SYSPROBE_BUILDIMAGES: v14002862-b2bcfc9
DATADOG_AGENT_SYSPROBE_BUILDIMAGES: v15101851-1eecc1f
DATADOG_AGENT_NIKOS_BUILDIMAGES_SUFFIX: ""
DATADOG_AGENT_NIKOS_BUILDIMAGES: v14002862-b2bcfc9
DATADOG_AGENT_NIKOS_BUILDIMAGES: v15101851-1eecc1f
DATADOG_AGENT_BTF_GEN_BUILDIMAGES_SUFFIX: ""
DATADOG_AGENT_BTF_GEN_BUILDIMAGES: v14002862-b2bcfc9
DATADOG_AGENT_BTF_GEN_BUILDIMAGES: v15101851-1eecc1f
DATADOG_AGENT_BUILDERS: v9930706-ef9d493

DATADOG_AGENT_EMBEDDED_PATH: /opt/datadog-agent/embedded
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/kitchen_testing/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

.kitchen_scenario_debian_a6_x64:
variables:
KITCHEN_OSVERS: "debian-9,debian-10,debian-11"
KITCHEN_OSVERS: "debian-10,debian-11"
KITCHEN_CWS_SUPPORTED_OSVERS: "debian-10,debian-11"
DEFAULT_KITCHEN_OSVERS: "debian-11"
extends:
Expand All @@ -32,7 +32,7 @@

.kitchen_scenario_debian_a7_x64:
variables:
KITCHEN_OSVERS: "debian-9,debian-10,debian-11"
KITCHEN_OSVERS: "debian-10,debian-11"
KITCHEN_CWS_SUPPORTED_OSVERS: "debian-10,debian-11"
DEFAULT_KITCHEN_OSVERS: "debian-11"
extends:
Expand Down
69 changes: 68 additions & 1 deletion .gitlab/kitchen_testing/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@
# Until the code is stabilized
allow_failure: true

# Base test for Next Gen installer with NPM - only difference with the standard one
# is that we override the WINDOWS_AGENT_FILE name.
.kitchen_test_ng_windows_npm_driver_base:
extends:
- .kitchen_azure_x64
before_script: # test all of the kernels to make sure the driver loads and runs properly
- export WINDOWS_AGENT_FILE=datadog-agent-ng-$(inv agent.version --url-safe --major-version $AGENT_MAJOR_VERSION)-1-x86_64
- if [ $AGENT_MAJOR_VERSION == "7" ]; then export WINDOWS_TESTING_S3_BUCKET=$WINDOWS_TESTING_S3_BUCKET_A7; else export WINDOWS_TESTING_S3_BUCKET=$WINDOWS_TESTING_S3_BUCKET_A6; fi
- if [ $AGENT_MAJOR_VERSION == "7" ]; then export RELEASE_VERSION=$RELEASE_VERSION_7; else export RELEASE_VERSION=$RELEASE_VERSION_6; fi
- export WINDOWS_DDNPM_DRIVER=$(inv release.get-release-json-value "$RELEASE_VERSION::WINDOWS_DDNPM_DRIVER")
- cd $DD_AGENT_TESTING_DIR
- tasks/kitchen_setup.sh
script:
- tasks/run-test-kitchen.sh windows-npmdriver $AGENT_MAJOR_VERSION

.kitchen_test_windows_npm_driver_base:
extends:
- .kitchen_azure_x64
Expand All @@ -95,6 +110,14 @@
# Kitchen tests on old OSes fail due a Rubygems API deprecation: https://blog.rubygems.org/2023/04/07/dependency-api-deprecation-delayed.html
allow_failure: true

.kitchen_test_ng_windows_npm_driver:
extends:
- .kitchen_test_ng_windows_npm_driver_base
variables:
KITCHEN_PLATFORM: "windows"
KITCHEN_OSVERS: "win2016,win2019,win2019cn,win2022"
DEFAULT_KITCHEN_OSVERS: "win2022"

.kitchen_test_windows_npm_driver:
extends:
- .kitchen_test_windows_npm_driver_base
Expand All @@ -103,6 +126,25 @@
KITCHEN_OSVERS: "win2016,win2019,win2019cn,win2022"
DEFAULT_KITCHEN_OSVERS: "win2022"

# Base test for Next Gen installer with NPM - only difference with the standard one
# is that we override the WINDOWS_AGENT_FILE name.
.kitchen_test_ng_windows_npm_installer:
extends:
- .kitchen_azure_x64
variables:
KITCHEN_PLATFORM: "windows"
KITCHEN_OSVERS: "win2016"
before_script: # Use only 2016 and 2019 for testing that we upgrade properly and don't install the driver when not specified
- export WINDOWS_AGENT_FILE=datadog-agent-ng-$(inv agent.version --url-safe --major-version $AGENT_MAJOR_VERSION)-1-x86_64
- if [ $AGENT_MAJOR_VERSION == "7" ]; then export WINDOWS_TESTING_S3_BUCKET=$WINDOWS_TESTING_S3_BUCKET_A7; else export WINDOWS_TESTING_S3_BUCKET=$WINDOWS_TESTING_S3_BUCKET_A6; fi
- if [ $AGENT_MAJOR_VERSION == "7" ]; then export RELEASE_VERSION=$RELEASE_VERSION_7; else export RELEASE_VERSION=$RELEASE_VERSION_6; fi
- export WINDOWS_DDNPM_DRIVER=$(inv release.get-release-json-value "$RELEASE_VERSION::WINDOWS_DDNPM_DRIVER")
- cd $DD_AGENT_TESTING_DIR
- tasks/kitchen_setup.sh
script:
- export LAST_STABLE_VERSION=$(cd ../.. && invoke release.get-release-json-value "last_stable::$AGENT_MAJOR_VERSION")
- tasks/run-test-kitchen.sh windows-npm-test $AGENT_MAJOR_VERSION

.kitchen_test_windows_npm_installer:
extends:
- .kitchen_azure_x64
Expand Down Expand Up @@ -140,12 +182,24 @@
- .kitchen_datadog_agent_flavor
- .kitchen_azure_location_north_central_us

.kitchen_test_ng_windows_installer_driver:
extends:
- .kitchen_test_ng_windows_npm_driver
- .kitchen_datadog_agent_flavor
- .kitchen_azure_location_north_central_us

.kitchen_test_windows_installer_driver:
extends:
- .kitchen_test_windows_npm_driver
- .kitchen_datadog_agent_flavor
- .kitchen_azure_location_north_central_us

.kitchen_test_ng_windows_installer_npm:
extends:
- .kitchen_test_ng_windows_npm_installer
- .kitchen_datadog_agent_flavor
- .kitchen_azure_location_north_central_us

.kitchen_test_windows_installer_npm:
extends:
- .kitchen_test_windows_npm_installer
Expand Down Expand Up @@ -182,11 +236,24 @@
# Kitchen: final test matrix (test types * scenarios)
# ----------------------------------------------

kitchen_windows_ng_installer_npm_install_scenarios-a7:
extends:
- .kitchen_scenario_windows_a7
- .kitchen_test_ng_windows_installer_npm

kitchen_windows_installer_npm_install_scenarios-a7:
extends:
- .kitchen_scenario_windows_a7
- .kitchen_test_windows_installer_npm

kitchen_windows_ng_installer_npm_driver-a7:
# Run NPM driver installer test on branches, on a reduced number of platforms
rules:
!reference [.on_default_kitchen_tests_a7]
extends:
- .kitchen_scenario_windows_a7
- .kitchen_test_ng_windows_installer_driver

kitchen_windows_installer_npm_driver-a7:
# Run NPM driver installer test on branches, on a reduced number of platforms
rules:
Expand All @@ -204,7 +271,7 @@ kitchen_windows_installer_agent-a6:
extends:
- .kitchen_scenario_windows_a6
- .kitchen_test_windows_installer_agent

kitchen_windows_ng_installer_agent-a6:
extends:
- .kitchen_scenario_windows_a6
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/source_test/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tests_deb-x64-py3:
lint_deb-x64:
extends:
- .linux_lint
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64:$DATADOG_AGENT_BUILDIMAGES
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["runner:main"]
needs: ["go_deps", "go_tools_deps"]

Expand Down Expand Up @@ -141,7 +141,7 @@ tests_rpm-x64-py3:
lint_rpm-x64:
extends:
- .linux_lint
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_x64:$DATADOG_AGENT_BUILDIMAGES
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["runner:main"]
needs: ["go_deps", "go_tools_deps"]
variables:
Expand Down Expand Up @@ -173,7 +173,7 @@ lint_deb-arm64:
extends:
- .linux_lint
needs: ["go_deps", "go_tools_deps"]
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64:$DATADOG_AGENT_BUILDIMAGES
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["runner:docker-arm", "platform:arm64"]

tests_rpm-arm64-py2:
Expand Down Expand Up @@ -201,7 +201,7 @@ tests_rpm-arm64-py3:
lint_rpm-arm64:
extends:
- .linux_lint
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64:$DATADOG_AGENT_BUILDIMAGES
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["runner:docker-arm", "platform:arm64"]
needs: ["go_deps", "go_tools_deps"]

Expand Down
2 changes: 1 addition & 1 deletion .gitlab/source_test/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
script:
- $ErrorActionPreference = "Stop"
- '$_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content ; Write-Host "Running on instance $($_instance_id)"'
- docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e PY_RUNTIMES="$PYTHON_RUNTIMES" -e GOMODCACHE="c:\modcache" 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/windows_1809_${ARCH}:$Env:DATADOG_AGENT_WINBUILDIMAGES c:\mnt\tasks\winbuildscripts\lint.bat
- docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e PY_RUNTIMES="$PYTHON_RUNTIMES" -e GOMODCACHE="c:\modcache" 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:$Env:DATADOG_AGENT_WINBUILDIMAGES c:\mnt\tasks\winbuildscripts\lint.bat
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }

tests_windows-x64:
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19.7
1.19.8
22 changes: 22 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
Release Notes
=============

.. _Release Notes_7.43.2:

7.43.2 / 6.43.2
======

.. _Release Notes_7.43.2_Prelude:

Prelude
-------

Release on: 2023-04-20


.. _Release Notes_7.43.2_Enhancement Notes:

Enhancement Notes
-----------------

- Upgraded JMXFetch to ``0.47.8`` which has improvements aimed
to help large metric collections drop fewer payloads.


.. _Release Notes_7.43.1:

7.43.1 / 6.43.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ data:
"wait4",
"waitid",
"waitpid",
"write"
"write",
"statx"
],
"action": "SCMP_ACT_ALLOW",
"args": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ data:
"wait4",
"waitid",
"waitpid",
"write"
"write",
"statx"
],
"action": "SCMP_ACT_ALLOW",
"args": null
Expand Down
16 changes: 16 additions & 0 deletions cmd/agent/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ import (
"os"
"path/filepath"

"github.com/DataDog/datadog-agent/comp/core"
"github.com/DataDog/datadog-agent/comp/core/config"
"github.com/DataDog/datadog-agent/comp/core/log"
"github.com/fatih/color"
"github.com/spf13/cobra"
)

const (
ConfigName = "datadog"
LoggerName = "CORE"
)

// GlobalParams contains the values of agent-global Cobra flags.
//
// A pointer to this type is passed to SubcommandFactory's, but its contents
Expand All @@ -31,6 +39,14 @@ type GlobalParams struct {
// SubcommandFactory is a callable that will return a slice of subcommands.
type SubcommandFactory func(globalParams *GlobalParams) []*cobra.Command

// GetDefaultCoreBundleParams returns the default params for the Core Bundle (config loaded from the "datadog" file,
// without secrets and logger disabled).
func GetDefaultCoreBundleParams(globalParams *GlobalParams) core.BundleParams {
return core.BundleParams{
ConfigParams: config.NewAgentParamsWithoutSecrets(globalParams.ConfFilePath),
LogParams: log.LogForOneShot(LoggerName, "off", true)}
}

// MakeCommand makes the top-level Cobra command for this app.
func MakeCommand(subcommandFactories []SubcommandFactory) *cobra.Command {
globalParams := GlobalParams{}
Expand Down
Loading

0 comments on commit ce2bdb3

Please sign in to comment.