Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nick.ripley/share-age…
Browse files Browse the repository at this point in the history
…nt-url-resolution
  • Loading branch information
nsrip-dd committed Jul 16, 2024
2 parents 8c3fee2 + 5438748 commit 18114c7
Show file tree
Hide file tree
Showing 215 changed files with 20,748 additions and 1,251 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ jobs:

macos:
name: ${{ matrix.runs-on }} go${{ matrix.go-version }}
runs-on: macos-11 # oldest macos runner available - the full macOS matrix is in go-libddwaf
runs-on: ${{ matrix.runs-on }}
needs: go-mod-caching
strategy:
matrix:
runs-on: [ macos-11, macos-14 ] # oldest and newest macos runners available - macos-14 mainly is here to cover the fact it is an ARM machine
go-version: [ "1.22", "1.21", "1.20" ]
runs-on: [ macos-12, macos-14 ] # oldest and newest macos runners available - macos-14 mainly is here to cover the fact it is an ARM machine
go-version: [ "1.22", "1.21" ]
fail-fast: true # saving some CI time - macos runners too long to get
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -124,9 +124,6 @@ jobs:
run: |
set -euxo pipefail
cgocheck="GOEXPERIMENT=cgocheck2"
if [[ "$(go version)" =~ go1.20 ]]; then
cgocheck="GODEBUG=cgocheck=2"
fi
for cgo in "0" "1"; do
for appsec_enabled_env in "" "DD_APPSEC_ENABLED=true" "DD_APPSEC_ENABLED=false"; do
for cgocheck_env in "" "$cgocheck"; do
Expand Down Expand Up @@ -190,14 +187,9 @@ jobs:
needs: go-mod-caching
strategy:
matrix:
go-version: [ "1.22", "1.21", "1.20" ]
distribution: [ bookworm, bullseye, buster, alpine ]
go-version: [ "1.22", "1.21" ]
distribution: [ bookworm, bullseye, alpine ]
platform: [ linux/amd64, linux/arm64 ]
exclude:
- go-version: "1.21"
distribution: buster
- go-version: "1.22"
distribution: buster

fail-fast: false
steps:
Expand Down Expand Up @@ -266,6 +258,7 @@ jobs:

test-app-smoke-tests:
name: Smoke Tests
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner == 'DataDog'
uses: DataDog/appsec-go-test-app/.github/workflows/smoke-tests.yml@main
with:
dd-trace-go-version: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
21 changes: 21 additions & 0 deletions .github/workflows/datadog-static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on: [push]

name: Datadog Static Analysis

jobs:
static-analysis:
runs-on: ubuntu-latest
name: Datadog Static Analyzer
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check code meets quality and security standards
id: datadog-static-analysis
uses: DataDog/datadog-static-analyzer-github-action@v1
with:
dd_api_key: ${{ secrets.STATIC_ANALYZER_API_KEY }}
dd_app_key: ${{ secrets.STATIC_ANALYZER_APP_KEY }}
dd_service: dd-trace-go
dd_env: ci
dd_site: datadoghq.com
cpu_count: 2
4 changes: 2 additions & 2 deletions .github/workflows/main-branch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
unit-integration-tests:
strategy:
matrix:
go-version: ["1.20", "1.21", "1.22"]
go-version: [ "1.21", "1.22" ]
fail-fast: false
uses: ./.github/workflows/unit-integration-tests.yml
with:
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
runs-on: [ macos-latest, windows-latest, ubuntu-latest ]
go-version: ["1.20", "1.21", "1.22"]
go-version: [ "1.21", "1.22" ]
fail-fast: false
uses: ./.github/workflows/multios-unit-tests.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multios-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:

jobs:
test-multi-os:
runs-on: "${{ (inputs.go-version == '1.20' && inputs.runs-on == 'windows-latest') && 'windows-2019' || inputs.runs-on }}"
runs-on: "${{ inputs.runs-on }}"
env:
REPORT: gotestsum-report.xml # path to where test results will be saved
DD_APPSEC_WAF_TIMEOUT: 1h
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/parametric-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "oldstable"

- name: Build runner
uses: ./.github/actions/install_runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
name: PR Unit and Integration Tests
uses: ./.github/workflows/unit-integration-tests.yml
with:
go-version: "1.20"
go-version: "1.21"
ref: ${{ github.ref }}
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@v3
with:
go-version: "stable"
go-version: "1.21"
cache: true
- name: go mod tidy
run: |-
Expand All @@ -99,7 +99,7 @@ jobs:
matrix:
# TODO: cross-compilation from/to different hardware architectures once
# github provides native ARM runners.
go: [ "1.20", "1.21", "1.22" ]
go: [ "1.21", "1.22", "1.23-rc" ]
build-env: [ alpine, bookworm, bullseye ]
build-with-cgo: [ 0, 1 ]
deployment-env: [ alpine, debian11, debian12, al2, al2023, busybox, scratch ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- APPSEC_BLOCKING_FULL_DENYLIST
- APPSEC_REQUEST_BLOCKING
- APPSEC_API_SECURITY
- APPSEC_RASP
- APM_TRACING_E2E
- APM_TRACING_E2E_SINGLE_SPAN
- APM_TRACING_E2E_OTEL
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/unit-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ jobs:
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_flags: "--timeout 10m" # We are hitting timeout when there is no cache
go_version: ${{ inputs.go-version }}
golangci_lint_version: v1.52.2
golangci_lint_version: v1.59.1
fail_on_error: true
reporter: github-pr-review

Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
DD_POOL_TRACE_CHECK_FAILURES: true
DD_DISABLE_ERROR_RESPONSES: true
cassandra:
image: cassandra:3.7
image: cassandra:3.11
env:
JVM_OPTS: "-Xms750m -Xmx750m"
ports:
Expand Down Expand Up @@ -311,14 +312,16 @@ jobs:
mkdir -p $TEST_RESULTS
PACKAGE_NAMES=$(go list ./... | grep -v /contrib/)
gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report.xml -- $PACKAGE_NAMES -v -race -coverprofile=coverage.txt -covermode=atomic
cd ./internal/exectracetest
gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report-exectrace.xml -- -v -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload the results to Datadog CI App
if: always()
continue-on-error: true
uses: ./.github/actions/dd-ci-upload
with:
dd-api-key: ${{ secrets.DD_CI_API_KEY }}
files: ${{ env.TEST_RESULTS }}/gotestsum-report.xml
files: ${{ env.TEST_RESULTS }}/gotestsum-report.xml ${{ env.TEST_RESULTS }}/gotestsum-report-exectrace.xml
tags: go:${{ inputs.go-version }}},arch:${{ runner.arch }},os:${{ runner.os }},distribution:${{ runner.distribution }}
- name: Upload Coverage
if: always()
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ stages:
- test-apps

variables:
# This base image is created here: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/30723596
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-go-30723596
# This base image is created here: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/38806487
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-go-38806487
INDEX_FILE: index.txt
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-go
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"
Expand Down
74 changes: 32 additions & 42 deletions .gitlab/macrobenchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ variables:
GO_PROF_APP_BUILD_VARIANT: "candidate"
DD_TRACE_GO_VERSION: "latest"

LOAD_TESTS: io-bound,cpu-bound,cgo-cpu-bound,cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"

# Workaround: Currently we're not running the benchmarks on every PR, but GitHub still shows them as pending.
# By marking the benchmarks as allow_failure, this should go away. (This workaround should be removed once the
# benchmarks get changed to run on every PR)
allow_failure: true

go122-baseline:
extends: .benchmarks
variables:
Expand All @@ -43,9 +46,8 @@ go122-baseline:
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.22.1"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
GO_VERSION: "1.22.5"

go122-only-trace:
extends: .benchmarks
variables:
Expand All @@ -54,9 +56,8 @@ go122-only-trace:
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.22.1"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
GO_VERSION: "1.22.5"

go122-only-profile:
extends: .benchmarks
variables:
Expand All @@ -65,9 +66,8 @@ go122-only-profile:
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.22.1"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
GO_VERSION: "1.22.5"

go122-profile-trace:
extends: .benchmarks
variables:
Expand All @@ -76,9 +76,8 @@ go122-profile-trace:
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.22.1"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
GO_VERSION: "1.22.5"

go122-trace-asm:
extends: .benchmarks
variables:
Expand All @@ -87,9 +86,8 @@ go122-trace-asm:
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.22.1"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
GO_VERSION: "1.22.5"

go122-profile-trace-asm:
extends: .benchmarks
variables:
Expand All @@ -98,72 +96,64 @@ go122-profile-trace-asm:
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.22.1"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
go120-baseline:
GO_VERSION: "1.22.5"

go121-baseline:
extends: .benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "false"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.20.14"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
go120-only-trace:
GO_VERSION: "1.21.12"

go121-only-trace:
extends: .benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.20.14"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
go120-only-profile:
GO_VERSION: "1.21.12"

go121-only-profile:
extends: .benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "false"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.20.14"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
go120-profile-trace:
GO_VERSION: "1.21.12"

go121-profile-trace:
extends: .benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.20.14"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
go120-trace-asm:
GO_VERSION: "1.21.12"

go121-trace-asm:
extends: .benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.20.14"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
go120-profile-trace-asm:
GO_VERSION: "1.21.12"

go121-profile-trace-asm:
extends: .benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
GO_VERSION: "1.20.14"
LOAD_TESTS: normal_operation_io-bound,high_load_io-bound|normal_operation_cpu-bound,high_load_cpu-bound|normal_operation_cgo-cpu-bound,high_load_cgo-cpu-bound|normal_operation_cpu-bound-x-client-ip-enabled,high_load_cpu-bound-x-client-ip-enabled
PARALLELIZE: "true"
GO_VERSION: "1.21.12"
3 changes: 3 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ go.sum
/datastreams @Datadog/data-streams-monitoring
/internal/datastreams @Datadog/data-streams-monitoring

# civisibility
/internal/civisibility @DataDog/ci-app-libraries

# Gitlab configuration
.gitlab-ci.yml @DataDog/dd-trace-go-guild @DataDog/apm-core-reliability-and-performance
/.gitlab-ci @DataDog/dd-trace-go-guild @DataDog/apm-core-reliability-and-performance
Loading

0 comments on commit 18114c7

Please sign in to comment.