Skip to content

Commit 0bcf473

Browse files
Merge branch 'master' into bdu/test-decoupling-on-jdk21
2 parents cb81424 + f296927 commit 0bcf473

File tree

768 files changed

+8624
-6202
lines changed

Some content is hidden

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

768 files changed

+8624
-6202
lines changed

.editorconfig

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,54 @@ end_of_line=lf
77
insert_final_newline=true
88
indent_style=space
99
indent_size=2
10-
11-
[*.json]
12-
indent_style=space
13-
indent_size=2
10+
ij_continuation_indent_size=4
1411

1512
[*.java]
16-
indent_style=space
17-
indent_size=2
18-
continuation_indent_size=4
13+
ij_java_class_count_to_use_import_on_demand = 99
14+
ij_java_insert_inner_class_imports = false
15+
ij_java_imports_layout = |,$*,|,*,|
16+
ij_java_layout_on_demand_import_from_same_package_first = true
17+
ij_java_layout_static_imports_separately = true
18+
ij_java_names_count_to_use_import_on_demand = 99
19+
ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
20+
21+
22+
ij_java_block_comment_add_space = false
23+
ij_java_block_comment_at_first_column = false
24+
ij_java_line_comment_add_space = true
25+
ij_java_line_comment_add_space_on_reformat = false
26+
ij_java_line_comment_at_first_column = false
27+
28+
29+
[{*.groovy,*.gradle}]
30+
ij_groovy_class_count_to_use_import_on_demand = 99
31+
ij_groovy_imports_layout = $*,|,*,|
32+
ij_groovy_names_count_to_use_import_on_demand = 99
33+
ij_groovy_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
34+
35+
ij_groovy_block_comment_add_space = false
36+
ij_groovy_block_comment_at_first_column = false
37+
ij_groovy_line_comment_add_space = true
38+
ij_groovy_line_comment_add_space_on_reformat = false
39+
ij_groovy_line_comment_at_first_column = false
40+
41+
[{*.kt,*.kts}]
42+
ij_kotlin_import_nested_classes = false
43+
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
44+
45+
ij_kotlin_name_count_to_use_star_import = 99
46+
ij_kotlin_name_count_to_use_star_import_for_members = 99
47+
ij_kotlin_packages_to_use_import_on_demand = kotlinx.android.synthetic.**,io.ktor.**
48+
49+
ij_kotlin_block_comment_add_space = false
50+
ij_kotlin_block_comment_at_first_column = false
51+
ij_kotlin_line_comment_add_space = true
52+
ij_kotlin_line_comment_add_space_on_reformat = false
53+
ij_kotlin_line_comment_at_first_column = false
54+
1955

2056
[{*.yml,*.yaml}]
21-
indent_style=space
22-
indent_size=2
57+
ij_yaml_line_comment_add_space = true
58+
ij_yaml_line_comment_add_space_on_reformat = false
59+
ij_yaml_line_comment_at_first_column = false
2360

.github/chainguard/self.add-release-to-cloudfoundry.sts.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.
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+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/create-release-branch\.yaml@refs/heads/master
9+
10+
permissions:
11+
contents: write
12+
pull_requests: 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/add-release-to-cloudfoundry.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ jobs:
5353
exit 0;
5454
fi
5555
56-
git commit -a -m "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
56+
git add --all
57+
git commit -m "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
5758
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
5859
- name: Push changes
59-
uses: DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
60+
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1
6061
if: ${{ steps.create-commit.outputs.commit != '' }}
6162
with:
6263
branch: cloudfoundry

.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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
117+
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
122118
if: always()
123119
with:
124120
sarif_file: 'trivy-results.sarif'
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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: write # Allow pushing the empty release branch
19+
contents: read
20+
id-token: write # Required for OIDC token federation
21+
steps:
22+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
23+
id: octo-sts
24+
with:
25+
scope: DataDog/dd-trace-java
26+
policy: self.update-system-tests.create-pr
27+
28+
- name: Checkout dd-trace-java at tag
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
30+
31+
- name: Determine tag
32+
id: determine-tag
33+
run: |
34+
if [ -n "${{ github.event.inputs.tag }}" ]; then
35+
TAG=${{ github.event.inputs.tag }}
36+
else
37+
TAG=${GITHUB_REF#refs/tags/}
38+
fi
39+
if ! [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.0$ ]]; then
40+
echo "Error: Tag $TAG is not in the expected format: vX.Y.0"
41+
exit 1
42+
fi
43+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
44+
45+
- name: Define branch name from tag
46+
id: define-branch
47+
run: |
48+
TAG=${{ steps.determine-tag.outputs.tag }}
49+
echo "branch=release/${TAG%.0}.x" >> "$GITHUB_OUTPUT"
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: Create and push empty release branch
64+
# if: steps.check-branch.outputs.creating_new_branch == 'true'
65+
# run: |
66+
# git checkout -b "${{ steps.define-branch.outputs.branch }}"
67+
# git push -u origin "${{ steps.define-branch.outputs.branch }}"
68+
69+
- name: Update system-tests references to latest commit SHA on main
70+
# if: steps.check-branch.outputs.creating_new_branch == 'true'
71+
run: BRANCH=main ./tooling/update_system_test_reference.sh
72+
73+
- name: Define temp branch name
74+
# if: steps.check-branch.outputs.creating_new_branch == 'true'
75+
id: define-temp-branch
76+
run: echo "temp-branch=ci/pin-system-tests-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
77+
78+
- name: Commit changes
79+
# if: steps.check-branch.outputs.creating_new_branch == 'true'
80+
id: create-commit
81+
run: |
82+
git config user.name "github-actions[bot]"
83+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
84+
git commit -m "chore: Pin system-tests for release branch" .github/workflows/run-system-tests.yaml
85+
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
86+
87+
- name: Push changes to temp branch
88+
# if: steps.check-branch.outputs.creating_new_branch == 'true'
89+
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1
90+
with:
91+
token: "${{ steps.octo-sts.outputs.token }}"
92+
branch: "${{ steps.define-temp-branch.outputs.temp-branch }}"
93+
head-sha: "${{ github.sha }}"
94+
create-branch: true
95+
command: push
96+
commits: "${{ steps.create-commit.outputs.commit }}"
97+
98+
- name: Create pull request from temp branch to release branch
99+
# if: steps.check-branch.outputs.creating_new_branch == 'true'
100+
env:
101+
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
102+
run: |
103+
gh pr create --title "Pin system-tests for ${{ steps.define-branch.outputs.branch }}" \
104+
--base "${{ steps.define-branch.outputs.branch }}" \
105+
--head "${{ steps.define-temp-branch.outputs.temp-branch }}" \
106+
--label "tag: dependencies" \
107+
--label "tag: no release notes" \
108+
--body "This PR pins the system-tests reference for the release branch."

.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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ jobs:
7171
git commit -m "feat(ci): Update Docker build image" .gitlab-ci.yml
7272
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
7373
- name: Push changes
74-
uses: DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
74+
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1
7575
if: steps.check-changes.outputs.commit_changes == 'true'
7676
with:
7777
token: "${{ steps.octo-sts.outputs.token }}"
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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
env:
2727
ORG_GRADLE_PROJECT_akkaRepositoryToken: ${{ secrets.AKKA_REPO_TOKEN }}
2828
run: |
29+
find . -name 'gradle.lockfile' -delete
2930
GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx3G -Xms2G'" \
3031
JAVA_HOME=$JAVA_HOME_8_X64 \
3132
JAVA_8_HOME=$JAVA_HOME_8_X64 \
@@ -54,17 +55,19 @@ jobs:
5455
run: |
5556
git config user.name "github-actions[bot]"
5657
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57-
git commit -a -m "chore: Update Gradle dependencies"
58+
git add --all
59+
git commit -m "chore: Update Gradle dependencies"
5860
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
5961
- name: Push changes
60-
uses: DataDog/commit-headless@1186485b788f57eedaaadb19919781698b4d262f # action/v1.0.0
62+
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1
6163
if: steps.check-changes.outputs.commit_changes == 'true'
6264
with:
6365
token: "${{ steps.octo-sts.outputs.token }}"
6466
branch: "${{ steps.define-branch.outputs.branch }}"
6567
# for scheduled runs, sha is the tip of the default branch
6668
# for dispatched runs, sha is the tip of the branch it was dispatched on
67-
branch-from: "${{ github.sha }}"
69+
head-sha: "${{ github.sha }}"
70+
create-branch: true
6871
command: push
6972
commits: "${{ steps.create-commit.outputs.commit }}"
7073
- name: Create pull request

0 commit comments

Comments
 (0)