Skip to content

Commit

Permalink
Merge branch 'main' into nicholas.hulston/s3-span-pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
nhulston authored Dec 12, 2024
2 parents 6d3d800 + 3627a74 commit 99af7e6
Show file tree
Hide file tree
Showing 240 changed files with 1,709 additions and 3,079 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@
/pkg/process/metadata/parser/*windows* @DataDog/universal-service-monitoring @DataDog/processes @DataDog/Networks @DataDog/windows-kernel-integrations
/pkg/process/monitor/ @DataDog/universal-service-monitoring
/pkg/process/net/ @DataDog/universal-service-monitoring @DataDog/Networks
/pkg/process/net/common_windows.go @DataDog/windows-agent
/pkg/proto/datadog/remoteconfig/ @DataDog/remote-config
/pkg/proto/pbgo/ # do not notify anyone
/pkg/proto/pbgo/trace @DataDog/agent-apm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
go-version-file: ".go-version"

- name: Initialize CodeQL
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/init@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
with:
languages: ${{ matrix.language }}
config: |
Expand All @@ -67,4 +67,4 @@ jobs:
invoke agent.build --build-exclude=systemd
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/analyze@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
11 changes: 9 additions & 2 deletions .github/workflows/collector-generate-and-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Read tool versions
id: tool-versions
run: |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.22.8'
go-version: ${{ env.GO_VERSION }}

- name: Install Dependencies
run: |
Expand All @@ -34,6 +40,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
inv -e install-tools
inv -e collector.update
inv -e collector.generate
inv -e generate-licenses
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_rc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
value: ${{fromJSON(needs.find_release_branches.outputs.branches)}}
fail-fast: false
steps:
- name: Checkout release branch
- name: Checkout the main branch
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
persist-credentials: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/serverless-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.SERVERLESS_AWS_SECRET_ACCESS_KEY }}
GOWORK: off
with:
timeout_minutes: 60
timeout_minutes: 120
max_attempts: 2
command: |
RAWLOGS_DIR="${{ steps.rawlogs.outputs.dir }}/${{ matrix.architecture }}"
Expand Down
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ variables:
.if_main_branch: &if_main_branch
if: $CI_COMMIT_BRANCH == "main"

.if_not_main_branch: &if_not_main_branch
if: $CI_COMMIT_BRANCH != "main"

.if_release_branch: &if_release_branch
if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/

Expand Down Expand Up @@ -628,6 +631,10 @@ workflow:
variables:
FAST_TESTS: "true"

.only_main:
- <<: *if_not_main_branch
when: never

.except_main_or_release_branch:
- <<: *if_main_branch
when: never
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/JOBOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ deploy_packages* @DataDog/agent-delivery
deploy_staging* @DataDog/agent-delivery
publish_winget* @DataDog/windows-agent
powershell_script_deploy @DataDog/windows-agent
windows_bootstrapper_deploy @DataDog/windows-agent
windows_bootstrapper_deploy @DataDog/windows-agent
qa_*_oci @DataDog/agent-delivery
qa_installer_script @DataDog/agent-delivery
qa_installer_script* @DataDog/agent-delivery

# Deploy containers
deploy_containers* @Datadog/agent-delivery
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: 1f340fd450e3
TEST_INFRA_DEFINITIONS_BUILDIMAGES: 9c7c5005ca28
1 change: 1 addition & 0 deletions .gitlab/e2e_install_packages/include.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include:
- .gitlab/e2e_install_packages/centos.yml
- .gitlab/e2e_install_packages/suse.yml
- .gitlab/e2e_install_packages/windows.yml
- .gitlab/e2e_install_packages/installer.yml
15 changes: 15 additions & 0 deletions .gitlab/e2e_install_packages/installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
qa_installer_script_main:
image: registry.ddbuild.io/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
stage: e2e_install_packages
tags: ["arch:amd64"]
rules:
- !reference [.only_main] # Disable non-main branch. Must be first.
- !reference [.on_installer_or_e2e_changes]
- !reference [.manual]
needs:
- new-e2e-installer-script
- installer-install-scripts
before_script:
- ls $OMNIBUS_PACKAGE_DIR
script:
- $S3_CP_CMD --recursive --exclude "*" --include "install-*.sh" "$OMNIBUS_PACKAGE_DIR" "s3://${INSTALLER_TESTING_S3_BUCKET}/scripts/"
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ issues:
exclude:
- "Error return value of `io.WriteString` is not checked" # 'errcheck' errors in tools/dep_tree_resolver/go_deps.go
- "Error return value of `pem.Encode` is not checked" # 'errcheck' errors in test/integration/utils/certificates.go
- "Error return value of `c.logErrorNotImplemented` is not checked" # 'errcheck' errors in pkg/config/nodetreemodel/config.go
- "Error return value of `n.logErrorNotImplemented` is not checked" # 'errcheck' errors in pkg/config/nodetreemodel/config.go
- "exported: exported const Exec should have comment \\(or a comment on this block\\) or be unexported" # 'revive' errors in pkg/process/events/model/model_common.go
- "exported: exported const APIName should have comment \\(or a comment on this block\\) or be unexported" # 'revive' errors in pkg/serverless/trace/inferredspan/constants.go
- "unnecessary conversion" # 'unconvert' errors in test/integration/utils/certificates_test.go
Expand Down
4 changes: 3 additions & 1 deletion Dockerfiles/agent/windows/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ARG WITH_JMX="false"
ARG VARIANT="unknown"
ARG INSTALL_INFO="unknown"
ARG GENERAL_ARTIFACTS_CACHE_BUCKET_URL
ARG WITH_FIPS="false"
# Should be empty for non-FIPS builds
ARG WITH_FIPS

LABEL maintainer "Datadog <package@datadoghq.com>"

Expand All @@ -23,6 +24,7 @@ RUN . ./install.ps1
COPY bouncycastle-fips /fips-build
COPY install-fips.ps1 ./
RUN . ./install-fips.ps1
ENV JAVA_TOOL_OPTIONS="${WITH_FIPS:+--module-path=\'c:\\program files\\datadog\\bouncycastle fips\' -Djava.security.properties==\'c:\\program files\\datadog\\bouncycastle fips\\java.security\' -Dpolicy.url.2=\'file:c:\\program files\\datadog\\bouncycastle fips\\bc-fips.policy\'}"

EXPOSE 8125/udp 8126/tcp

Expand Down
5 changes: 5 additions & 0 deletions cmd/installer-downloader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func runDownloader(ctx context.Context, env *env.Env, version string, flavor str
return fmt.Errorf("failed to download installer: %w", err)
}
cmd := exec.CommandContext(ctx, filepath.Join(tmpDir, installerBinPath), "setup", "--flavor", flavor)
cmd.Dir = tmpDir
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Env = append(os.Environ(), telemetry.EnvFromContext(ctx)...)
Expand All @@ -92,6 +93,10 @@ func downloadInstaller(ctx context.Context, env *env.Env, version string, tmpDir
if downloadedPackage.Name != installerPackage {
return fmt.Errorf("unexpected package name: %s, expected %s", downloadedPackage.Name, installerPackage)
}
err = downloadedPackage.WriteOCILayout(tmpDir)
if err != nil {
return fmt.Errorf("failed to write OCI layout: %w", err)
}
err = downloadedPackage.ExtractLayers(oci.DatadogPackageLayerMediaType, tmpDir)
if err != nil {
return fmt.Errorf("failed to extract layers: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/security-agent/subcommands/compliance/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"path/filepath"
"strings"

"github.com/shirou/gopsutil/v3/process"
"github.com/shirou/gopsutil/v4/process"
"github.com/spf13/cobra"
"go.uber.org/fx"

Expand Down
2 changes: 1 addition & 1 deletion comp/agent/autoexit/autoexitimpl/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/DataDog/datadog-agent/comp/core/config"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/shirou/gopsutil/v3/process"
"github.com/shirou/gopsutil/v4/process"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions comp/api/authtoken/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ require (
github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect
github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect
github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect
github.com/DataDog/viper v1.13.5 // indirect
github.com/DataDog/viper v1.14.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/ebitengine/purego v0.8.1 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
Expand All @@ -93,8 +94,7 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/shirou/gopsutil/v4 v4.24.11 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
Expand Down
14 changes: 6 additions & 8 deletions comp/api/authtoken/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions comp/core/config/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.3
github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0
github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1
github.com/DataDog/viper v1.13.5
github.com/DataDog/viper v1.14.0
github.com/stretchr/testify v1.10.0
go.uber.org/fx v1.23.0
)
Expand Down Expand Up @@ -71,6 +71,7 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/ebitengine/purego v0.8.1 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
Expand All @@ -89,8 +90,7 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/shirou/gopsutil/v4 v4.24.11 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
Expand Down
14 changes: 6 additions & 8 deletions comp/core/config/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions comp/core/log/impl-trace/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ require (
github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect
github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.1 // indirect
github.com/DataDog/datadog-agent/pkg/version v0.59.1 // indirect
github.com/DataDog/viper v1.13.5 // indirect
github.com/DataDog/viper v1.14.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/ebitengine/purego v0.8.1 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
Expand All @@ -93,8 +94,7 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/shirou/gopsutil/v4 v4.24.11 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
Expand Down
Loading

0 comments on commit 99af7e6

Please sign in to comment.