Skip to content

Commit 99c8aa7

Browse files
committed
Merge remote-tracking branch 'origin/master' into vandonr/jdbc-ff
2 parents 66401dd + 4d1a38c commit 99c8aa7

File tree

1,574 files changed

+28161
-12930
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,574 files changed

+28161
-12930
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

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@
115115
**/datastreams/ @DataDog/data-streams-monitoring
116116
**/DataStreams* @DataDog/data-streams-monitoring
117117

118+
# @DataDog/feature-flagging-and-experimentation-sdk
119+
/products/feature-flagging/ @DataDog/feature-flagging-and-experimentation-sdk
120+
118121
# @DataDog/profiling-java
119122
/dd-java-agent/agent-profiling/ @DataDog/profiling-java
120123
/dd-java-agent/agent-crashtracking/ @DataDog/profiling-java

.github/chainguard/self.update-system-tests.push.sts.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/README.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ _Action:_ Check the pull request did not introduce unexpected label.
3636

3737
_Recovery:_ Update the pull request or add a comment to trigger the action again.
3838

39+
### create-release-branch [🔗](create-release-branch.yaml)
40+
41+
_Trigger:_ When a git tag matching the pattern "vM.N.0" is pushed (e.g. for a minor release).
42+
43+
_Action:_ Create a release branch that corresponds to the pushed tag (e.g. "release/vM.N.x").
44+
45+
_Recovery:_ Manually create the branch from the "vM.N.0" git tag.
46+
3947
### draft-release-notes-on-tag [🔗](draft-release-notes-on-tag.yaml)
4048

4149
_Trigger:_ When creating a tag, or manually (providing a tag)
@@ -61,6 +69,15 @@ _Recovery:_ Manually [close the related milestone and create a new one](https://
6169

6270
_Notes:_ This action will not apply to release candidate versions using `-RC` tags.
6371

72+
### prune-old-pull-requests [🔗](prune-old-pull-requests.yaml)
73+
74+
_Trigger:_ Every month or manually.
75+
76+
_Action:_ Mark as stale and comment on pull requests with no update during the last quarter.
77+
Close them if no following update within a week.
78+
79+
_Recovery:_ Manually trigger the action again.
80+
6481
### update-docker-build-image [🔗](update-docker-build-image.yaml)
6582

6683
_Trigger:_ Quarterly released, loosely [a day after the new image tag is created](https://github.com/DataDog/dd-trace-java-docker-build/blob/master/.github/workflows/docker-tag.yml).
@@ -93,25 +110,15 @@ _Action:_
93110

94111
_Recovery:_ Check at the milestone for the related issues and update them manually.
95112

96-
97-
### prune-old-pull-requests [🔗](prune-old-pull-requests.yaml)
98-
99-
_Trigger:_ Every month or manually.
100-
101-
_Action:_ Mark as stale and comment on pull requests with no update during the last quarter.
102-
Close them if no following update within a week.
103-
104-
_Recovery:_ Manually trigger the action again.
105-
106113
## Code Quality and Security
107114

108115
### analyze-changes [🔗](analyze-changes.yaml)
109116

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

112119
_Action:_
113120

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

117124
_Notes:_ Results are sent on both production and staging environments.
@@ -122,14 +129,6 @@ _Trigger:_ When creating a PR commits to `master` or a `release/*` branch with a
122129

123130
_Action:_ Notify the PR author through comments that about the Git Submodule update.
124131

125-
### update-gradle-dependencies [🔗](update-gradle-dependencies.yaml)
126-
127-
_Trigger:_ Every week or manually.
128-
129-
_Action:_ Create a PR updating the Grade dependencies and their locking files.
130-
131-
_Recovery:_ Manually trigger the action again.
132-
133132
### run-system-tests [🔗](run-system-tests.yaml)
134133

135134
_Trigger:_ When pushing commits to `master` or manually.
@@ -138,6 +137,14 @@ _Action:_ Build the Java Client Library and runs [the system tests](https://gith
138137

139138
_Recovery:_ Manually trigger the action on the desired branch.
140139

140+
### update-gradle-dependencies [🔗](update-gradle-dependencies.yaml)
141+
142+
_Trigger:_ Every week or manually.
143+
144+
_Action:_ Create a PR updating the Grade dependencies and their locking files.
145+
146+
_Recovery:_ Manually trigger the action again.
147+
141148
### update-jmxfetch-submodule [🔗](update-jmxfetch-submodule.yaml)
142149

143150
_Trigger:_ Monthly or manually

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

Lines changed: 3 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
13+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
1414
with:
1515
ref: cloudfoundry
1616
- name: Get release version
@@ -53,7 +53,8 @@ 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
5960
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1

.github/workflows/analyze-changes.yaml

Lines changed: 8 additions & 12 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:
@@ -20,7 +16,7 @@ jobs:
2016

2117
steps:
2218
- name: Checkout repository
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
2420
with:
2521
submodules: 'recursive'
2622
- name: Cache Gradle dependencies
@@ -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@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
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@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
5753

5854
trivy:
5955
name: Analyze changes with Trivy
@@ -65,7 +61,7 @@ jobs:
6561

6662
steps:
6763
- name: Checkout repository
68-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
64+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
6965
with:
7066
submodules: 'recursive'
7167

@@ -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@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
122118
if: always()
123119
with:
124120
sarif_file: 'trivy-results.sarif'

.github/workflows/check-pull-request-labels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
repo: context.repo.repo
4646
})
4747
const commentMarker = '<!-- dd-trace-java-check-pr-labels-workflow -->'
48-
const blockingComment = comments.data.find(comment => comment.body.includes(commentMarker))
48+
let blockingComment = comments.data.find(comment => comment.body.includes(commentMarker))
4949
// Create or update blocking comment if there are invalid labels
5050
if (hasInvalidLabels) {
5151
const commentBody = '**PR Blocked - Invalid Label**\n\n' +
Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Create Release Branch and Pin System-Tests
1+
name: Create Release Branch
22

33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.0' # Trigger on minor release tags (e.g. v1.54.0)
6+
- 'v[0-9]+.[0-9]+.0' # Trigger on minor release tags (e.g. v1.54.0)
77
workflow_dispatch:
88
inputs:
99
tag:
@@ -15,15 +15,8 @@ jobs:
1515
create-release-branch:
1616
runs-on: ubuntu-latest
1717
permissions:
18-
contents: read
19-
id-token: write # Required for OIDC token federation
18+
contents: write # Allow pushing the release branch
2019
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-
2720
- name: Determine tag
2821
id: determine-tag
2922
run: |
@@ -42,43 +35,27 @@ jobs:
4235
id: define-branch
4336
run: |
4437
TAG=${{ steps.determine-tag.outputs.tag }}
45-
BRANCH="release/${TAG%.0}.x"
46-
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
38+
echo "branch=release/${TAG%.0}.x" >> "$GITHUB_OUTPUT"
4739
48-
- name: Checkout dd-trace-java
49-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
40+
- name: Checkout dd-trace-java at tag
41+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
42+
with:
43+
ref: ${{ steps.determine-tag.outputs.tag }}
5044

5145
- name: Check if branch already exists
5246
id: check-branch
5347
run: |
5448
BRANCH=${{ steps.define-branch.outputs.branch }}
5549
if git ls-remote --heads origin "$BRANCH" | grep -q "$BRANCH"; then
5650
echo "creating_new_branch=false" >> "$GITHUB_OUTPUT"
57-
echo "Branch $BRANCH already exists - skipping following steps"
51+
echo "Branch $BRANCH already exists - skipping creation"
5852
else
5953
echo "creating_new_branch=true" >> "$GITHUB_OUTPUT"
60-
echo "Branch $BRANCH does not exist - proceeding with following steps"
54+
echo "Branch $BRANCH does not exist - creating it now"
6155
fi
6256
63-
- name: Update system-tests references to latest commit SHA on main
57+
- name: Create and push release branch
6458
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
7059
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-
branch-from: "${{ github.sha }}"
83-
command: push
84-
commits: "${{ steps.create-commit.outputs.commit }}"
60+
git checkout -b "${{ steps.define-branch.outputs.branch }}"
61+
git push -u origin "${{ steps.define-branch.outputs.branch }}"

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
group: APM Larger Runners
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
26+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
2727
with:
2828
submodules: 'recursive'
2929
fetch-depth: 0
@@ -52,7 +52,7 @@ jobs:
5252
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
5353
5454
- name: Upload artifact
55-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
55+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
5656
with:
5757
name: binaries
5858
path: workspace/dd-java-agent/build/libs/
@@ -84,4 +84,15 @@ jobs:
8484
if: ${{ always() }}
8585
needs: [build, main]
8686
steps:
87-
- run: exit 0
87+
- name: Fail if build failed
88+
if: ${{ needs.build.result != 'success' }}
89+
run: |
90+
echo "❌ Build job did not succeed: ${{ needs.build.result }}"
91+
exit 1
92+
- name: Fail if main failed or is skipped
93+
if: ${{ needs.main.result != 'success' }}
94+
run: |
95+
echo "❌ Main job did not succeed: ${{ needs.main.result }}"
96+
exit 1
97+
- name: Success
98+
run: echo "✅ All required jobs succeeded."

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
policy: self.update-docker-build-image.create-pr
2626

2727
- name: Checkout the repository
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2929
- name: Define the Docker build image tag to use
3030
id: define-tag
3131
run: |
@@ -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

0 commit comments

Comments
 (0)