Skip to content

Commit 8612213

Browse files
authored
Merge branch 'master' into dougqh/interceptor-bypass
2 parents a395a5d + d5d53cd commit 8612213

File tree

733 files changed

+26873
-3927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

733 files changed

+26873
-3927
lines changed

.circleci/config.continue.yml.j2

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ instrumentation_modules: &instrumentation_modules "dd-java-agent/instrumentation
3636
debugger_modules: &debugger_modules "dd-java-agent/agent-debugger|dd-java-agent/agent-bootstrap|dd-java-agent/agent-builder|internal-api|communication|dd-trace-core"
3737
profiling_modules: &profiling_modules "dd-java-agent/agent-profiling"
3838

39-
default_system_tests_commit: &default_system_tests_commit 761b9e7a82ffb136c4653a4d1623d120d67b005b
39+
default_system_tests_commit: &default_system_tests_commit b0b2e1f212f8c483b52aa3adc6ffd4132b1ba9b8
4040

4141
parameters:
4242
nightly:
@@ -167,8 +167,7 @@ commands:
167167
if [[ "$BRANCH" != "master" ]] && [[ "$BRANCH" != "release/*" ]]; then
168168
# We know that we have checked out the PR merge branch, so the HEAD commit is a merge
169169
# As a backup, if anything goes wrong with the diff, the build will fail
170-
# Get list of changed files directly using git diff-tree to avoid issues with large binary files
171-
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r HEAD)
170+
CHANGED_FILES=$(git show HEAD | grep -e "^Merge:" | cut -d ' ' -f 2- | sed 's/ /.../' | xargs git diff --name-only)
172171
# Count the number of matches, and ignore if the grep doesn't match anything
173172
MATCH_COUNT=$(echo "$CHANGED_FILES" | grep -c -E "<< pipeline.parameters.global_pattern >>|<< parameters.pattern >>") || true
174173
if [[ "$MATCH_COUNT" -eq "0" ]]; then
@@ -851,8 +850,6 @@ jobs:
851850
(
852851
echo "
853852
DEFAULT
854-
APM_TRACING_E2E
855-
APM_TRACING_E2E_SINGLE_SPAN
856853
TRACING_CONFIG_NONDEFAULT
857854
TRACING_CONFIG_NONDEFAULT_2
858855
TRACING_CONFIG_NONDEFAULT_3
@@ -876,14 +873,8 @@ jobs:
876873
"
877874
fi
878875
) | circleci tests split > scenarios.list
876+
export DD_API_KEY=$SYSTEM_TESTS_DD_API_KEY
879877
for scenario in $(<scenarios.list); do
880-
if [[ $scenario =~ .*_E2E.* ]]; then
881-
export DD_SITE=datadoghq.com
882-
export DD_API_KEY=$SYSTEM_TESTS_E2E_DD_API_KEY
883-
export DD_APPLICATION_KEY=$SYSTEM_TESTS_E2E_DD_APP_KEY
884-
else
885-
export DD_API_KEY=$SYSTEM_TESTS_DD_API_KEY
886-
fi
887878
echo "Running scenario $scenario"
888879
./run.sh $scenario
889880
done
@@ -923,27 +914,11 @@ jobs:
923914
924915
- run:
925916
name: Run APM Integrations tests
926-
environment:
927-
- AWS_ACCESS_KEY_ID: $SYSTEM_TESTS_IDM_AWS_ACCESS_KEY_ID
928-
- AWS_SECRET_ACCESS_KEY: $SYSTEM_TESTS_IDM_AWS_SECRET_ACCESS_KEY
929-
- AWS_REGION: us-east-1
930-
- AWS_DEFAULT_REGION: us-east-1 # AWS services should use `AWS_REGION`, but some still use the older `AWS_DEFAULT_REGION`
931917
# Stop the job after 5m to avoid excessive overhead. Will need adjustment as more tests are added.
932918
no_output_timeout: 5m
933919
command: |
934920
cd system-tests
935-
DD_SITE=datadoghq.com DD_API_KEY=$SYSTEM_TESTS_E2E_DD_API_KEY DD_APPLICATION_KEY=$SYSTEM_TESTS_E2E_DD_APP_KEY ./run.sh INTEGRATIONS
936-
937-
- run:
938-
name: Run IDM Crossed Tracing Libraries propagation tests for messaging
939-
environment:
940-
- AWS_ACCESS_KEY_ID: $SYSTEM_TESTS_IDM_AWS_ACCESS_KEY_ID
941-
- AWS_SECRET_ACCESS_KEY: $SYSTEM_TESTS_IDM_AWS_SECRET_ACCESS_KEY
942-
- AWS_REGION: us-east-1
943-
- AWS_DEFAULT_REGION: us-east-1 # AWS services should use `AWS_REGION`, but some still use the older `AWS_DEFAULT_REGION`
944-
command: |
945-
cd system-tests
946-
DD_API_KEY=$SYSTEM_TESTS_DD_API_KEY ./run.sh CROSSED_TRACING_LIBRARIES
921+
DD_API_KEY=$SYSTEM_TESTS_DD_API_KEY ./run.sh INTEGRATIONS
947922
948923
- store_test_results:
949924
path: system-tests/logs_integrations
@@ -976,7 +951,7 @@ jobs:
976951
no_output_timeout: 5m
977952
command: |
978953
cd system-tests
979-
export DD_API_KEY=$SYSTEM_TESTS_E2E_DD_API_KEY
954+
export DD_API_KEY=$SYSTEM_TESTS_DD_API_KEY
980955
./run.sh DEBUGGER_SCENARIOS
981956
982957
- run:

.circleci/upload_ciapp.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,5 @@ junit_upload() {
3333
./results
3434
}
3535

36-
# Make sure we do not use DATADOG_API_KEY from the environment
37-
unset DATADOG_API_KEY
38-
3936
# Upload test results to production environment like all other CI jobs
4037
junit_upload "$DATADOG_API_KEY_PROD"
41-
# And also upload to staging environment to benefit from the new features not yet released
42-
junit_upload "$DATADOG_API_KEY_DDSTAGING"

.github/workflows/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ _Trigger:_ When pushing commits to `master` or any pull request targeting `maste
110110

111111
_Action:_
112112

113-
* Run [DataDog Static Analysis](https://docs.datadoghq.com/static_analysis/) and upload result to DataDog Code Analysis,
114113
* Run [GitHub CodeQL](https://codeql.github.com/) action, upload result to GitHub security tab -- do not apply to pull request, only when pushing to `master`,
115114
* Run [Trivy security scanner](https://github.com/aquasecurity/trivy) on built artifacts and upload result to GitHub security tab and Datadog Code Analysis.
116115

@@ -130,6 +129,21 @@ _Action:_ Create a PR updating the Grade dependencies and their locking files.
130129

131130
_Recovery:_ Manually trigger the action again.
132131

132+
### run-system-tests [🔗](run-system-tests.yaml)
133+
134+
_Trigger:_ When pushing commits to `master` or manually.
135+
136+
_Action:_ Build the Java Client Library and runs [the system tests](https://github.com/DataDog/system-tests) against.
137+
138+
_Recovery:_ Manually trigger the action on the desired branch.
139+
140+
### all-green [🔗](all-green.yaml)
141+
142+
_Trigger:_ Any pull request.
143+
144+
_Action:_ This action will check all other jobs (Github action, Gitlab, CircleCi), and will fail if any of them fails. This action got an `ignored` paraemters to exclude some jobs if they are temprorary failing. The purpose of this job is to be required for merges, achieving Green CI Policy.
145+
146+
_Recovery:_ Manually trigger the action on the desired branch.
133147

134148
## Maintenance
135149

.github/workflows/add-release-to-cloudfoundry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: |
4444
echo "${{ steps.get-release-version.outputs.VERSION }}: ${{ steps.get-release-url.outputs.URL }}" >> index.yml
4545
- name: Commit and push changes
46-
uses: planetscale/ghcommit-action@9400254a26464337cbe5af17c5f25075134e0089 # v0.2.7
46+
uses: planetscale/ghcommit-action@5b20c92facae8dbf8a3836dc65b8503dda378573 # v0.2.13
4747
with:
4848
commit_message: "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
4949
repo: ${{ github.repository }}

.github/workflows/all-green.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check Pull Request CI Status
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
checks: read
16+
statuses: read
17+
18+
jobs:
19+
all-jobs-are-green:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Run Ensure CI Success
23+
uses: DataDog/ensure-ci-success@f40e6ffd8e60280d478b9b92209aaa30d3d56895
24+
with:
25+
initial-delay-seconds: "1000"
26+
max-retries: "60"
27+
ignored-name-patterns: |
28+
dd-gitlab/default-pipeline
29+
dd-gitlab/check_inst 4/4
30+
dd-gitlab/muzzle .*
31+
32+
# ignored jobs :
33+
#
34+
# * dd-gitlab/default-pipeline => success rate of 70% (needs an owner)
35+
# * dd-gitlab/check_inst 4/4 => success rate of 78% (needs an owner)
36+
# * dd-gitlab/muzzle .* => success rate of ~85% (needs an owner)

.github/workflows/analyze-changes.yaml

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,6 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
datadog-static-analyzer:
17-
name: Analyze changes with DataDog Static Analyzer
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
22-
with:
23-
submodules: 'recursive'
24-
# Run the static analysis on the staging environment to benefit from the new features not yet released
25-
- name: Check code meets quality standards (staging)
26-
id: datadog-static-analysis-staging
27-
uses: DataDog/datadog-static-analyzer-github-action@1297a546e6bb268e2ac5bc98a1477d22be335822 # v1
28-
with:
29-
dd_app_key: ${{ secrets.DATADOG_APP_KEY_STAGING }}
30-
dd_api_key: ${{ secrets.DATADOG_API_KEY_STAGING }}
31-
dd_site: "datad0g.com"
32-
cpu_count: 2
33-
enable_performance_statistics: false
34-
3516
codeql:
3617
name: Analyze changes with GitHub CodeQL
3718
# Don’t run on PR, only when pushing to master
@@ -49,7 +30,7 @@ jobs:
4930
submodules: 'recursive'
5031

5132
- name: Cache Gradle dependencies
52-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
33+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5334
with:
5435
path: |
5536
~/.gradle/caches
@@ -59,7 +40,7 @@ jobs:
5940
${{ runner.os }}-gradle-
6041
6142
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
43+
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
6344
with:
6445
languages: 'java'
6546
build-mode: 'manual'
@@ -76,25 +57,7 @@ jobs:
7657
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
7758
7859
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
79-
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
80-
81-
# For now, CodeQL SARIF results are not supported by Datadog CI
82-
# - name: Upload results to Datadog CI Static Analysis
83-
# run: |
84-
# wget --no-verbose https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64 -O datadog-ci
85-
# chmod +x datadog-ci
86-
# ./datadog-ci sarif upload /home/runner/work/dd-trace-java/results/java.sarif --service dd-trace-java --env ci
87-
# env:
88-
# DD_API_KEY: ${{ secrets.DATADOG_APP_KEY_PROD }}
89-
# DD_SITE: datadoghq.com
90-
91-
# For now, CodeQL SARIF results are not supported by Datadog CI
92-
# - name: Upload results to Datadog Staging CI Static Analysis
93-
# run: |
94-
# ./datadog-ci sarif upload /home/runner/work/dd-trace-java/results/java.sarif --service dd-trace-java --env ci
95-
# env:
96-
# DD_API_KEY: ${{ secrets.DATADOG_API_KEY_STAGING }}
97-
# DD_SITE: datad0g.com
60+
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
9861

9962
trivy:
10063
name: Analyze changes with Trivy
@@ -111,7 +74,7 @@ jobs:
11174
submodules: 'recursive'
11275

11376
- name: Cache Gradle dependencies
114-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
77+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
11578
with:
11679
path: |
11780
~/.gradle/caches
@@ -144,7 +107,7 @@ jobs:
144107
ls -laR "./workspace/.trivy"
145108
146109
- name: Run Trivy security scanner
147-
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
110+
uses: aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # v0.30.0
148111
with:
149112
scan-type: rootfs
150113
scan-ref: './workspace/.trivy/'
@@ -157,7 +120,7 @@ jobs:
157120
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
158121

159122
- name: Upload Trivy scan results to GitHub Security tab
160-
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
123+
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
161124
if: always()
162125
with:
163126
sarif_file: 'trivy-results.sarif'
@@ -170,10 +133,3 @@ jobs:
170133
env:
171134
DD_API_KEY: ${{ secrets.DATADOG_API_KEY_PROD }}
172135
DD_SITE: datadoghq.com
173-
174-
- name: Upload results to Datadog Staging CI Static Analysis
175-
run: |
176-
./datadog-ci sarif upload trivy-results.sarif --service dd-trace-java --env ci
177-
env:
178-
DD_API_KEY: ${{ secrets.DATADOG_API_KEY_STAGING }}
179-
DD_SITE: datad0g.com

.github/workflows/draft-release-notes-on-tag.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ jobs:
125125
}
126126
function cleanUpTitle(title) {
127127
// Remove tags between brackets
128-
return title.replace(/\[[^\]]+\]/g, '')
128+
title = title.replace(/\[[^\]]+\]/g, '')
129+
// Remove cherry-pick prefix
130+
if (title.startsWith('🍒 ') && title.includes(' - ')) {
131+
title = title.substring(title.indexOf(' - ') + 3)
132+
}
133+
return title
129134
}
130135
function format(pullRequest) {
131136
var line = `${decorate(pullRequest)}${cleanUpTitle(pullRequest.title)} (#${pullRequest.number} - @${pullRequest.user.login}`
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: system-tests
1+
name: Run system tests
22

33
on:
44
pull_request:
@@ -21,18 +21,18 @@ jobs:
2121
fetch-depth: 0
2222

2323
- name: Cache Gradle dependencies
24-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
24+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
2525
with:
2626
path: |
2727
~/.gradle/caches
2828
~/.gradle/wrapper
2929
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
3030
restore-keys: |
3131
${{ runner.os }}-gradle-
32-
32+
3333
- name: Build dd-trace-java
3434
run: |
35-
GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G'" \
35+
GRADLE_OPTS="-Xms2g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC" \
3636
JAVA_HOME=$JAVA_HOME_8_X64 \
3737
JAVA_8_HOME=$JAVA_HOME_8_X64 \
3838
JAVA_11_HOME=$JAVA_HOME_11_X64 \
@@ -60,5 +60,5 @@ jobs:
6060
binaries_artifact: binaries
6161
desired_execution_time: 900 # 15 minutes
6262
scenarios_groups: tracer-release
63-
excluded_scenarios: CROSSED_TRACING_LIBRARIES,INTEGRATIONS_AWS # require AWS credentials
63+
excluded_scenarios: CROSSED_TRACING_LIBRARIES,INTEGRATIONS_AWS,APM_TRACING_E2E_OTEL,APM_TRACING_E2E_SINGLE_SPAN,PROFILING # require AWS and datadog credentials
6464
skip_empty_scenarios: true

.gitlab-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ default:
4242

4343
.set_datadog_api_keys: &set_datadog_api_keys
4444
- export DATADOG_API_KEY_PROD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.DATADOG_API_KEY_PROD --with-decryption --query "Parameter.Value" --out text)
45-
- export DATADOG_API_KEY_DDSTAGING=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.dd_api_key --with-decryption --query "Parameter.Value" --out text)
4645

4746
# CI_NODE_INDEX and CI_NODE_TOTAL are 1-indexed and not always set. These steps normalize the numbers for jobs
4847
.normalize_node_index: &normalize_node_index

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ plugins {
2222
id 'pl.allegro.tech.build.axion-release' version '1.14.4'
2323
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
2424

25-
id "com.github.johnrengelman.shadow" version "7.1.2" apply false
25+
id "com.github.johnrengelman.shadow" version "8.1.1" apply false
2626
id "me.champeau.jmh" version "0.7.0" apply false
2727
id 'org.gradle.playframework' version '0.13' apply false
2828
id 'info.solidsoft.pitest' version '1.9.11' apply false

0 commit comments

Comments
 (0)