Skip to content

Commit 59e159b

Browse files
authored
Merge branch 'master' into smola/host-tests
2 parents 32c1e15 + 4eaa53b commit 59e159b

File tree

1,164 files changed

+16587
-8800
lines changed

Some content is hidden

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

1,164 files changed

+16587
-8800
lines changed

.circleci/config.continue.yml.j2

Lines changed: 158 additions & 1 deletion
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 315bc8a32cc888834726397f088336ba8038277f
39+
default_system_tests_commit: &default_system_tests_commit 344e4abc912ada8004f2d0828a09efb65b5ee1e1
4040

4141
parameters:
4242
nightly:
@@ -365,6 +365,21 @@ jobs:
365365

366366
- display_memory_usage
367367

368+
spotless:
369+
<<: *defaults
370+
resource_class: medium+
371+
372+
steps:
373+
- setup_code
374+
375+
- run:
376+
name: Run spotless
377+
command: >-
378+
JAVA_HOME=$JAVA_11_HOME
379+
./gradlew spotlessCheck
380+
<< pipeline.parameters.gradle_flags >>
381+
--max-workers=8
382+
368383
check:
369384
<<: *defaults
370385

@@ -681,6 +696,8 @@ jobs:
681696
<<: *tests
682697

683698
resource_class: medium
699+
environment:
700+
- CI_AGENT_HOST=localhost
684701

685702
docker:
686703
- image: << pipeline.parameters.docker_image >>:{{ docker_image_prefix }}8
@@ -690,6 +707,117 @@ jobs:
690707
- DD_BIND_HOST=0.0.0.0
691708
- DD_API_KEY=invalid_key_but_this_is_fine
692709

710+
test_published_artifacts:
711+
<<: *defaults
712+
resource_class: medium
713+
docker:
714+
- image: << pipeline.parameters.docker_image >>:{{ docker_image_prefix }}7
715+
716+
steps:
717+
- setup_code
718+
- restore_dependency_cache:
719+
cacheType: lib
720+
- restore_build_cache:
721+
cacheType: lib
722+
723+
- run:
724+
name: Publish Artifacts Locally
725+
command: |
726+
mvn_local_repo=$(./mvnw help:evaluate -Dexpression=settings.localRepository -q -DforceStdout)
727+
rm -rf "${mvn_local_repo}/com/datadoghq"
728+
export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
729+
./gradlew publishToMavenLocal << pipeline.parameters.gradle_flags >> --max-workers=3
730+
731+
- run:
732+
name: Test Published Artifacts
733+
command: |
734+
cd test-published-dependencies
735+
export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx512M -Xms512M -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
736+
./gradlew check --info --max-workers=3
737+
738+
- run:
739+
name: Collect Reports
740+
when: on_fail
741+
command: .circleci/collect_reports.sh
742+
743+
- store_artifacts:
744+
path: ./reports
745+
746+
- display_memory_usage
747+
muzzle-dep-report:
748+
<<: *defaults
749+
resource_class: medium
750+
steps:
751+
- setup_code
752+
- skip_unless_matching_files_changed:
753+
pattern: "dd-java-agent/instrumentation"
754+
- restore_dependency_cache:
755+
cacheType: inst
756+
- restore_build_cache:
757+
cacheType: inst
758+
- run:
759+
name: Generate muzzle dep report
760+
command: >-
761+
SKIP_BUILDSCAN="true"
762+
GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
763+
./gradlew generateMuzzleReport muzzleInstrumentationReport
764+
- run:
765+
name: Collect Reports
766+
command: .circleci/collect_muzzle_deps.sh
767+
- store_artifacts:
768+
path: ./reports
769+
770+
muzzle:
771+
<<: *defaults
772+
resource_class: medium+
773+
parallelism: 4
774+
steps:
775+
- setup_code
776+
777+
- skip_unless_matching_files_changed:
778+
pattern: "dd-java-agent/instrumentation"
779+
780+
# We are not running with a separate cache of all muzzle artifacts here because it gets very big and
781+
# ends up taking more time restoring/saving than the actual increase in time it takes just
782+
# downloading the artifacts each time.
783+
#
784+
# Let's at least restore the build cache to have something to start from.
785+
- restore_dependency_cache:
786+
cacheType: inst
787+
- restore_build_cache:
788+
cacheType: inst
789+
790+
- run:
791+
name: Gather muzzle tasks
792+
command: >-
793+
SKIP_BUILDSCAN="true"
794+
GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
795+
./gradlew writeMuzzleTasksToFile
796+
<< pipeline.parameters.gradle_flags >>
797+
--max-workers=3
798+
799+
- run:
800+
name: Verify Muzzle
801+
command: >-
802+
SKIP_BUILDSCAN="true"
803+
GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx3G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
804+
./gradlew `circleci tests split --split-by=timings workspace/build/muzzleTasks | xargs`
805+
<< pipeline.parameters.gradle_flags >>
806+
--max-workers=4
807+
808+
- run:
809+
name: Collect Reports
810+
when: on_fail
811+
command: .circleci/collect_reports.sh
812+
813+
- store_artifacts:
814+
path: ./reports
815+
816+
- store_test_results:
817+
path: workspace/build/muzzle-test-results
818+
819+
- display_memory_usage
820+
693821
system-tests:
694822
machine:
695823
image: ubuntu-2404:current
@@ -731,6 +859,9 @@ jobs:
731859
APPSEC_REQUEST_BLOCKING
732860
APPSEC_RASP
733861
APPSEC_RUNTIME_ACTIVATION
862+
APPSEC_API_SECURITY
863+
APPSEC_API_SECURITY_RC
864+
APPSEC_API_SECURITY_WITH_SAMPLING
734865
APPSEC_WAF_TELEMETRY
735866
APPSEC_STANDALONE_V2
736867
IAST_STANDALONE_V2
@@ -760,6 +891,7 @@ jobs:
760891
for log_dir in logs*; do
761892
tar -cvzf ../artifacts/${log_dir}_<< parameters.weblog-variant >>.tar.gz $log_dir
762893
done
894+
when: always
763895
764896
- store_artifacts:
765897
path: artifacts
@@ -849,6 +981,7 @@ jobs:
849981
for dir in system-tests/logs*/; do
850982
cp -r "$dir" logs_debugger
851983
done
984+
when: always
852985
853986
- store_test_results:
854987
path: logs_debugger
@@ -943,6 +1076,7 @@ build_test_jobs: &build_test_jobs
9431076
name: build_profiling
9441077
gradleTarget: :profilingTest
9451078
cacheType: profiling
1079+
- spotless
9461080
9471081
- fan_in:
9481082
requires:
@@ -951,6 +1085,7 @@ build_test_jobs: &build_test_jobs
9511085
- build_inst
9521086
- build_smoke
9531087
- build_profiling
1088+
- spotless
9541089
name: ok_to_test
9551090
stage: ok_to_test
9561091
@@ -1299,6 +1434,24 @@ build_test_jobs: &build_test_jobs
12991434
cacheType: base
13001435
testJvm: "8"
13011436
1437+
- test_published_artifacts:
1438+
requires:
1439+
- ok_to_test
1440+
1441+
- muzzle:
1442+
requires:
1443+
- ok_to_test
1444+
filters:
1445+
branches:
1446+
ignore:
1447+
- master
1448+
- project/*
1449+
- release/*
1450+
1451+
- muzzle-dep-report:
1452+
requires:
1453+
- ok_to_test
1454+
13021455
- system-tests:
13031456
requires:
13041457
- ok_to_test
@@ -1319,6 +1472,7 @@ build_test_jobs: &build_test_jobs
13191472
13201473
- fan_in:
13211474
requires:
1475+
- test_published_artifacts
13221476
{% for jdk in all_jdks %}
13231477
- "test_{{ jdk }}_profiling"
13241478
{% endfor %}
@@ -1327,6 +1481,7 @@ build_test_jobs: &build_test_jobs
13271481
13281482
- fan_in:
13291483
requires:
1484+
- test_published_artifacts
13301485
{% for jdk in all_jdks %}
13311486
- "test_{{ jdk }}_debugger"
13321487
{% endfor %}
@@ -1338,11 +1493,13 @@ build_test_jobs: &build_test_jobs
13381493
- fan_in:
13391494
requires:
13401495
- check
1496+
- test_published_artifacts
13411497
- agent_integration_tests
13421498
{% for jdk in all_jdks %}
13431499
- "test_{{ jdk }}"
13441500
{% endfor %}
13451501
- test_inst_latest
1502+
- muzzle
13461503
- profiling
13471504
- debugger
13481505
- system-tests

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,10 @@ dd-java-agent/instrumentation/spring-security-5/ @DataDog/asm-java
6565
# @DataDog/data-jobs-monitoring
6666
dd-java-agent/instrumentation/spark/ @DataDog/data-jobs-monitoring
6767
dd-java-agent/instrumentation/spark-executor/ @DataDog/data-jobs-monitoring
68+
69+
# @DataDog/data-streams-monitoring
70+
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/datastreams @DataDog/data-streams-monitoring
71+
dd-trace-core/src/main/java/datadog/trace/core/datastreams @DataDog/data-streams-monitoring
72+
dd-trace-core/src/test/groovy/datadog/trace/core/datastreams @DataDog/data-streams-monitoring
73+
internal-api/src/main/java/datadog/trace/api/datastreams @DataDog/data-streams-monitoring
74+
internal-api/src/test/groovy/datadog/trace/api/datastreams @DataDog/data-streams-monitoring

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ _Recovery:_ Check at the milestone for the related issues and update them manual
8787

8888
### prune-github-container-registry [🔗](prune-github-container-registry.yaml)
8989

90-
_Trigger:_ Every week or manually.
90+
_Trigger:_ Every day or manually.
9191

9292
_Action:_ Clean up old lib-injection OCI images from GitHub Container Registry.
9393

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout "cloudfoundry" branch
13-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
13+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
1414
with:
1515
ref: cloudfoundry
1616
- name: Get release version
@@ -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@b68767a2e130a71926b365322e62b583404a5e09 # v0.1.43
46+
uses: planetscale/ghcommit-action@9400254a26464337cbe5af17c5f25075134e0089 # v0.2.7
4747
with:
4848
commit_message: "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
4949
repo: ${{ github.repository }}

.github/workflows/analyze-changes.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
2222
with:
2323
submodules: 'recursive'
2424
# Run the static analysis on the staging environment to benefit from the new features not yet released
2525
- name: Check code meets quality standards (staging)
2626
id: datadog-static-analysis-staging
27-
uses: DataDog/datadog-static-analyzer-github-action@c74aff158c8cc1c3e285660713bcaa5f9c6d696e # v1
27+
uses: DataDog/datadog-static-analyzer-github-action@1297a546e6bb268e2ac5bc98a1477d22be335822 # v1
2828
with:
2929
dd_app_key: ${{ secrets.DATADOG_APP_KEY_STAGING }}
3030
dd_api_key: ${{ secrets.DATADOG_API_KEY_STAGING }}
@@ -44,12 +44,12 @@ jobs:
4444

4545
steps:
4646
- name: Checkout repository
47-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
47+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
4848
with:
4949
submodules: 'recursive'
5050

5151
- name: Cache Gradle dependencies
52-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
52+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
5353
with:
5454
path: |
5555
~/.gradle/caches
@@ -59,7 +59,7 @@ jobs:
5959
${{ runner.os }}-gradle-
6060
6161
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
62+
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
6363
with:
6464
languages: 'java'
6565
build-mode: 'manual'
@@ -76,7 +76,7 @@ jobs:
7676
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
7777
7878
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
79-
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
79+
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
8080

8181
# For now, CodeQL SARIF results are not supported by Datadog CI
8282
# - name: Upload results to Datadog CI Static Analysis
@@ -106,12 +106,12 @@ jobs:
106106

107107
steps:
108108
- name: Checkout repository
109-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
109+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
110110
with:
111111
submodules: 'recursive'
112112

113113
- name: Cache Gradle dependencies
114-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
114+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
115115
with:
116116
path: |
117117
~/.gradle/caches
@@ -144,7 +144,7 @@ jobs:
144144
ls -laR "./workspace/.trivy"
145145
146146
- name: Run Trivy security scanner
147-
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
147+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
148148
with:
149149
scan-type: rootfs
150150
scan-ref: './workspace/.trivy/'
@@ -157,7 +157,7 @@ jobs:
157157
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
158158

159159
- name: Upload Trivy scan results to GitHub Security tab
160-
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
160+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
161161
if: always()
162162
with:
163163
sarif_file: 'trivy-results.sarif'

.github/workflows/prune-github-container-registry.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
container: dd-trace-java/dd-lib-java-init
2121
keep-younger-than: 7 # days
2222
keep-last: 10
23-
keep-tags: |
24-
latest_snapshot
2523
prune-tags-regexes: |
26-
^[a-z0-9]{40}$
24+
.+
2725
prune-untagged: true

.github/workflows/prune-old-pull-requests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write
1414
steps:
1515
- name: Prune old pull requests
16-
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
16+
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
1717
with:
1818
days-before-stale: -1 # Disable general stale bot
1919
days-before-pr-stale: 90 # Only enable stale bot for PRs with no activity for 90 days

0 commit comments

Comments
 (0)