Skip to content

Commit 208d02b

Browse files
authored
Merge branch 'master' into andrea.marziali/test-union
2 parents 7c5a065 + 015be6d commit 208d02b

File tree

2,344 files changed

+63817
-36641
lines changed

Some content is hidden

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

2,344 files changed

+63817
-36641
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/CODEOWNERS

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

118+
# @DataDog/feature-flagging-and-experimentation-sdk
119+
/dd-smoke-tests/openfeature/ @DataDog/feature-flagging-and-experimentation-sdk
120+
/products/feature-flagging/ @DataDog/feature-flagging-and-experimentation-sdk
121+
118122
# @DataDog/profiling-java
119123
/dd-java-agent/agent-profiling/ @DataDog/profiling-java
120124
/dd-java-agent/agent-crashtracking/ @DataDog/profiling-java

.github/chainguard/self.add-release-to-cloudfoundry.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: 20 additions & 7 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
1414
with:
1515
ref: cloudfoundry
1616
- name: Get release version
@@ -42,11 +42,24 @@ jobs:
4242
- name: Append release to Cloud Foundry repository
4343
run: |
4444
echo "${{ steps.get-release-version.outputs.VERSION }}: ${{ steps.get-release-url.outputs.URL }}" >> index.yml
45-
- name: Commit and push changes
46-
uses: planetscale/ghcommit-action@f24050e41f8694750427d111b52f4ef9ca81a32d # v0.2.18
45+
- name: Commit changes
46+
id: create-commit
47+
run: |
48+
git config user.name "github-actions[bot]"
49+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
50+
51+
if [[ -z "$(git status -s)" ]]; then
52+
echo "No changes to commit, exiting."
53+
exit 0;
54+
fi
55+
56+
git add --all
57+
git commit -m "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
58+
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
59+
- name: Push changes
60+
uses: DataDog/commit-headless@5a0f3876e0fbdd3a86b3e008acf4ec562db59eee # action/v2.0.1
61+
if: ${{ steps.create-commit.outputs.commit != '' }}
4762
with:
48-
commit_message: "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
49-
repo: ${{ github.repository }}
5063
branch: cloudfoundry
51-
env:
52-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
64+
command: push
65+
commits: "${{ steps.create-commit.outputs.commit }}"

.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
33+
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
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@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.29.5
117+
uses: github/codeql-action/upload-sarif@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
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: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Create Release Branch
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 release branch
19+
steps:
20+
- name: Determine tag
21+
id: determine-tag
22+
run: |
23+
if [ -n "${{ github.event.inputs.tag }}" ]; then
24+
TAG=${{ github.event.inputs.tag }}
25+
else
26+
TAG=${GITHUB_REF#refs/tags/}
27+
fi
28+
if ! [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.0$ ]]; then
29+
echo "Error: Tag $TAG is not in the expected format: vX.Y.0"
30+
exit 1
31+
fi
32+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
33+
34+
- name: Define branch name from tag
35+
id: define-branch
36+
run: |
37+
TAG=${{ steps.determine-tag.outputs.tag }}
38+
echo "branch=release/${TAG%.0}.x" >> "$GITHUB_OUTPUT"
39+
40+
- name: Checkout dd-trace-java at tag
41+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
42+
with:
43+
ref: ${{ steps.determine-tag.outputs.tag }}
44+
45+
- name: Check if branch already exists
46+
id: check-branch
47+
run: |
48+
BRANCH=${{ steps.define-branch.outputs.branch }}
49+
if git ls-remote --heads origin "$BRANCH" | grep -q "$BRANCH"; then
50+
echo "creating_new_branch=false" >> "$GITHUB_OUTPUT"
51+
echo "Branch $BRANCH already exists - skipping creation"
52+
else
53+
echo "creating_new_branch=true" >> "$GITHUB_OUTPUT"
54+
echo "Branch $BRANCH does not exist - creating it now"
55+
fi
56+
57+
- name: Create and push release branch
58+
if: steps.check-branch.outputs.creating_new_branch == 'true'
59+
run: |
60+
git checkout -b "${{ steps.define-branch.outputs.branch }}"
61+
git push -u origin "${{ steps.define-branch.outputs.branch }}"

.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@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
16+
uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1
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)