Skip to content

Commit 5835142

Browse files
Merge with master.
2 parents 5e61fe7 + d05020a commit 5835142

File tree

604 files changed

+3599
-1580
lines changed

Some content is hidden

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

604 files changed

+3599
-1580
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ij_java_line_comment_add_space_on_reformat = false
2626
ij_java_line_comment_at_first_column = false
2727

2828

29-
[*.groovy]
29+
[{*.groovy,*.gradle}]
3030
ij_groovy_class_count_to_use_import_on_demand = 99
3131
ij_groovy_imports_layout = $*,|,*,|
3232
ij_groovy_names_count_to_use_import_on_demand = 99
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject_pattern: repo:DataDog/dd-trace-java:ref:refs/(heads/master|tags/v[0-9]+.[0-9]+.0)
4+
5+
claim_pattern:
6+
event_name: (push|workflow_dispatch)
7+
ref: refs/(heads/master|tags/v[0-9]+\.[0-9]+\.0)
8+
ref_protected: "true"
9+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/create-release-branch\.yaml@refs/heads/master
10+
11+
permissions:
12+
contents: write

.github/workflows/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ _Recovery:_ Manually trigger the action again.
107107

108108
### analyze-changes [🔗](analyze-changes.yaml)
109109

110-
_Trigger:_ When pushing commits to `master`.
110+
_Trigger:_ Every day or manually.
111111

112112
_Action:_
113113

114-
* 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`,
114+
* Run [GitHub CodeQL](https://codeql.github.com/) action, upload result to GitHub security tab -- do not apply to pull request, only to `master`,
115115
* Run [Trivy security scanner](https://github.com/aquasecurity/trivy) on built artifacts and upload result to GitHub security tab and Datadog Code Analysis.
116116

117117
_Notes:_ Results are sent on both production and staging environments.

.github/workflows/analyze-changes.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Analyze changes
22

33
on:
4-
push:
5-
branches: [ master ]
6-
7-
# Cancel long-running jobs when a new commit is pushed
8-
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
4+
schedule:
5+
- cron: "0 20 * * *"
6+
workflow_dispatch:
117

128
jobs:
139
codeql:
@@ -34,7 +30,7 @@ jobs:
3430
${{ runner.os }}-gradle-
3531
3632
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
33+
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
3834
with:
3935
languages: 'java'
4036
build-mode: 'manual'
@@ -53,7 +49,7 @@ jobs:
5349
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
5450
5551
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
56-
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
52+
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
5753

5854
trivy:
5955
name: Analyze changes with Trivy
@@ -118,7 +114,7 @@ jobs:
118114
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
119115

120116
- name: Upload Trivy scan results to GitHub Security tab
121-
uses: github/codeql-action/upload-sarif@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
117+
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
122118
if: always()
123119
with:
124120
sarif_file: 'trivy-results.sarif'
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Create Release Branch and Pin System-Tests
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.0' # Trigger on minor release tags (e.g. v1.54.0)
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'The minor release tag (e.g. v1.54.0)'
11+
required: true
12+
type: string
13+
14+
jobs:
15+
create-release-branch:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
id-token: write # Required for OIDC token federation
20+
steps:
21+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
22+
id: octo-sts
23+
with:
24+
scope: DataDog/dd-trace-java
25+
policy: self.update-system-tests.push
26+
27+
- name: Determine tag
28+
id: determine-tag
29+
run: |
30+
if [ -n "${{ github.event.inputs.tag }}" ]; then
31+
TAG=${{ github.event.inputs.tag }}
32+
else
33+
TAG=${GITHUB_REF#refs/tags/}
34+
fi
35+
if ! [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.0$ ]]; then
36+
echo "Error: Tag $TAG is not in the expected format: vX.Y.0"
37+
exit 1
38+
fi
39+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
40+
41+
- name: Define branch name from tag
42+
id: define-branch
43+
run: |
44+
TAG=${{ steps.determine-tag.outputs.tag }}
45+
BRANCH="release/${TAG%.0}.x"
46+
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
47+
48+
- name: Checkout dd-trace-java
49+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
50+
51+
- name: Check if branch already exists
52+
id: check-branch
53+
run: |
54+
BRANCH=${{ steps.define-branch.outputs.branch }}
55+
if git ls-remote --heads origin "$BRANCH" | grep -q "$BRANCH"; then
56+
echo "creating_new_branch=false" >> "$GITHUB_OUTPUT"
57+
echo "Branch $BRANCH already exists - skipping following steps"
58+
else
59+
echo "creating_new_branch=true" >> "$GITHUB_OUTPUT"
60+
echo "Branch $BRANCH does not exist - proceeding with following steps"
61+
fi
62+
63+
- name: Update system-tests references to latest commit SHA on main
64+
if: steps.check-branch.outputs.creating_new_branch == 'true'
65+
run: BRANCH=main ./tooling/update_system_test_reference.sh
66+
67+
- name: Commit changes
68+
if: steps.check-branch.outputs.creating_new_branch == 'true'
69+
id: create-commit
70+
run: |
71+
git config user.name "github-actions[bot]"
72+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
73+
git commit -m "chore: Pin system-tests for release branch" .github/workflows/run-system-tests.yaml
74+
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
75+
76+
- name: Push changes
77+
if: steps.check-branch.outputs.creating_new_branch == 'true'
78+
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1
79+
with:
80+
token: "${{ steps.octo-sts.outputs.token }}"
81+
branch: "${{ steps.define-branch.outputs.branch }}"
82+
# for scheduled runs, sha is the tip of the default branch
83+
# for dispatched runs, sha is the tip of the branch it was dispatched on
84+
head-sha: "${{ github.sha }}"
85+
create-branch: true
86+
command: push
87+
commits: "${{ steps.create-commit.outputs.commit }}"

.github/workflows/run-system-tests.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ jobs:
6060
main:
6161
needs:
6262
- build
63-
uses: DataDog/system-tests/.github/workflows/system-tests.yml@main
63+
# If you change the following comment, update the pattern in the update_system_test_reference.sh script to match.
64+
uses: DataDog/system-tests/.github/workflows/system-tests.yml@main # system tests are pinned for releases only
6465
secrets: inherit
6566
permissions:
6667
contents: read
6768
id-token: write
6869
packages: write
6970
with:
7071
library: java
72+
# If you change the following comment, update the pattern in the update_system_test_reference.sh script to match.
73+
ref: main # system tests are pinned for releases only
7174
binaries_artifact: binaries
7275
desired_execution_time: 900 # 15 minutes
7376
scenarios_groups: tracer-release

.github/workflows/update-docker-build-image.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ jobs:
7878
branch: "${{ steps.define-branch.outputs.branch }}"
7979
# for scheduled runs, sha is the tip of the default branch
8080
# for dispatched runs, sha is the tip of the branch it was dispatched on
81-
branch-from: "${{ github.sha }}"
81+
head-sha: "${{ github.sha }}"
82+
create-branch: true
8283
command: push
8384
commits: "${{ steps.create-commit.outputs.commit }}"
8485
- name: Create pull request

.github/workflows/update-gradle-dependencies.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ jobs:
6464
branch: "${{ steps.define-branch.outputs.branch }}"
6565
# for scheduled runs, sha is the tip of the default branch
6666
# for dispatched runs, sha is the tip of the branch it was dispatched on
67-
branch-from: "${{ github.sha }}"
67+
head-sha: "${{ github.sha }}"
68+
create-branch: true
6869
command: push
6970
commits: "${{ steps.create-commit.outputs.commit }}"
7071
- name: Create pull request

.github/workflows/update-jmxfetch-submodule.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ jobs:
5454
branch: "${{ steps.define-branch.outputs.branch }}"
5555
# for scheduled runs, sha is the tip of the default branch
5656
# for dispatched runs, sha is the tip of the branch it was dispatched on
57-
branch-from: "${{ github.sha }}"
57+
head-sha: "${{ github.sha }}"
58+
create-branch: true
5859
command: push
5960
commits: "${{ steps.create-commit.outputs.commit }}"
6061
- name: Create pull request

.gitlab-ci.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include:
33
- local: ".gitlab/benchmarks.yml"
44
- local: ".gitlab/macrobenchmarks.yml"
55
- local: ".gitlab/exploration-tests.yml"
6-
- local: ".gitlab/ci-visibility-tests.yml"
6+
# - local: ".gitlab/ci-visibility-tests.yml"
77

88
stages:
99
- build
@@ -135,7 +135,6 @@ default:
135135
MAVEN_OPTS: "-Xms64M -Xmx512M"
136136
GRADLE_WORKERS: 2
137137
GRADLE_MEM: 2560M
138-
GRADLE_MEM_MAX: 4096M
139138
KUBERNETES_CPU_REQUEST: 8
140139
KUBERNETES_MEMORY_REQUEST: 8Gi
141140
KUBERNETES_MEMORY_LIMIT: 8Gi
@@ -168,20 +167,13 @@ default:
168167
before_script:
169168
- source .gitlab/gitlab-utils.sh
170169
# Akka token added to SSM from https://account.akka.io/token
171-
- export AKKA_REPO_TOKEN=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.akka_repo_token --with-decryption --query "Parameter.Value" --out text)
170+
- export ORG_GRADLE_PROJECT_akkaRepositoryToken=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.akka_repo_token --with-decryption --query "Parameter.Value" --out text)
171+
- export ORG_GRADLE_PROJECT_mavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY
172+
- export ORG_GRADLE_PROJECT_gradlePluginProxy=$GRADLE_PLUGIN_PROXY
172173
- mkdir -p .gradle
173-
- export GRADLE_USER_HOME=$(pwd)/.gradle
174-
- |
175-
# Don't put jvm args here as it will be picked up by child gradle processes used in tests
176-
cat << EOF > $GRADLE_USER_HOME/gradle.properties
177-
mavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY
178-
gradlePluginProxy=$GRADLE_PLUGIN_PROXY
179-
akkaRepositoryToken=$AKKA_REPO_TOKEN
180-
EOF
181-
- |
182-
# replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties
183-
sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties
184-
- export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xms$GRADLE_MEM -Xmx$GRADLE_MEM_MAX -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
174+
# replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties
175+
- sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties
176+
- export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xms$GRADLE_MEM -Xmx$GRADLE_MEM -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
185177
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS"
186178
- *normalize_node_index
187179
# for weird reasons, gradle will always "chmod 700" the .gradle folder
@@ -728,7 +720,7 @@ test_smoke_graalvm:
728720
NON_DEFAULT_JVMS: "true"
729721
parallel:
730722
matrix:
731-
- testJvm: ["graalvm17", "graalvm21"]
723+
- testJvm: ["graalvm17", "graalvm21", "graalvm25"]
732724

733725
test_smoke_semeru8_debugger:
734726
extends: .test_job

0 commit comments

Comments
 (0)