Skip to content

Commit fdd5cdd

Browse files
authored
Merge branch 'master' into vandonr/fix
2 parents e259d58 + 326cc38 commit fdd5cdd

978 files changed

Lines changed: 22354 additions & 3690 deletions

File tree

Some content is hidden

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

.claude/skills/techdebt/SKILL.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: techdebt
3+
description: Analyze branch changes for technical debt, code duplication, and unnecessary complexity
4+
user-invocable: true
5+
context: fork
6+
allowed-tools:
7+
- Bash
8+
- Read
9+
- Grep
10+
- Glob
11+
---
12+
13+
# Techdebt Cleanup Skill
14+
15+
Analyze changes on the current branch to identify and fix technical debt, code duplication, and unnecessary complexity.
16+
17+
## Instructions
18+
19+
### Step 1: Get Branch Changes
20+
21+
Find the merge-base (where this branch diverged from master) and compare against it:
22+
23+
```bash
24+
# Find upstream (DataDog org repo)
25+
UPSTREAM=$(git remote -v | grep -E 'DataDog/[^/]+(.git)?\s' | head -1 | awk '{print $1}')
26+
if [ -z "$UPSTREAM" ]; then
27+
echo "No DataDog upstream found, using origin"
28+
UPSTREAM="origin"
29+
fi
30+
31+
# Find the merge-base (commit where this branch diverged from master)
32+
MERGE_BASE=$(git merge-base HEAD ${UPSTREAM}/master)
33+
echo "Comparing changes introduced on this branch since diverging from master using base commit: $MERGE_BASE"
34+
35+
git diff $MERGE_BASE --stat
36+
git diff $MERGE_BASE --name-status
37+
```
38+
39+
If no changes exist, inform the user and stop.
40+
41+
If changes exist, read the diff and the full content of modified source files (not test files) to understand context.
42+
43+
### Step 2: Analyze for Issues
44+
45+
Look for:
46+
47+
**Code Duplication**
48+
- Similar code blocks that should be extracted into shared functions
49+
- Copy-pasted logic with minor variations
50+
51+
**Unnecessary Complexity**
52+
- Over-engineered solutions (abstractions used only once)
53+
- Excessive indirection or layers
54+
- Backward compatibility shims that aren't needed
55+
56+
**Redundant Code**
57+
- Dead code paths
58+
- Overly defensive checks for impossible scenarios
59+
60+
### Step 3: Report and Fix
61+
62+
Present a concise summary of issues found with file:line references.
63+
64+
Then ask the user if they want you to fix the issues. When fixing:
65+
- Make one logical change at a time
66+
- Do NOT change behavior, only refactor
67+
- Skip trivial or stylistic issues

.github/pull_request_template.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66

77
# Contributor Checklist
88

9-
- Format the title [according the contribution guidelines](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#title-format)
10-
- Assign the `type:` and (`comp:` or `inst:`) labels in addition to [any useful labels](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#labels)
11-
- Don't use `close`, `fix` or any [linking keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) when referencing an issue.
9+
- Format the title according to [the contribution guidelines](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#title-format)
10+
- Assign the `type:` and (`comp:` or `inst:`) labels in addition to [any other useful labels](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#labels)
11+
- Avoid using `close`, `fix`, or [any linking keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) when referencing an issue
1212
Use `solves` instead, and assign the PR [milestone](https://github.com/DataDog/dd-trace-java/milestones) to the issue
13-
- Update the [CODEOWNERS](https://github.com/DataDog/dd-trace-java/blob/master/.github/CODEOWNERS) file on source file addition, move, or deletion
14-
- Update the [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) in case of new configuration flag or behavior
13+
- Update the [CODEOWNERS](https://github.com/DataDog/dd-trace-java/blob/master/.github/CODEOWNERS) file on source file addition, migration, or deletion
14+
- Update [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) with any new configuration flags or behaviors
1515

1616
Jira ticket: [PROJ-IDENT]
1717

18+
***Note:*** **Once your PR is ready to merge, add it to the merge queue by commenting `/merge`.** `/merge -c` cancels the queue request. `/merge -f --reason "reason"` skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see [this doc](https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/3121612126/MergeQueue).
19+
1820
<!--
1921
# Opening vs Drafting a PR:
2022
When opening a pull request, please open it as a draft to not auto assign reviewers before you feel the pull request is in a reviewable state.

.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
1414
with:
1515
ref: cloudfoundry
1616
- name: Get release version
@@ -57,7 +57,7 @@ jobs:
5757
git commit -m "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
5858
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
5959
- name: Push changes
60-
uses: DataDog/commit-headless@583489e08d78037e7fa256c14adf998d5463f6a0 # action/v2.0.2
60+
uses: DataDog/commit-headless@05d7b7ee023e2c7d01c47832d420c2503cd416f3 # action/v2.0.3
6161
if: ${{ steps.create-commit.outputs.commit != '' }}
6262
with:
6363
branch: cloudfoundry

.github/workflows/analyze-changes.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
2020
with:
2121
submodules: 'recursive'
2222
- name: Cache Gradle dependencies
23-
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
23+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2424
with:
2525
path: |
2626
~/.gradle/caches
@@ -30,7 +30,7 @@ jobs:
3030
${{ runner.os }}-gradle-
3131
3232
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
33+
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
3434
with:
3535
languages: 'java'
3636
build-mode: 'manual'
@@ -49,7 +49,7 @@ jobs:
4949
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
5050
5151
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
52-
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
52+
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
5353

5454
trivy:
5555
name: Analyze changes with Trivy
@@ -61,12 +61,12 @@ jobs:
6161

6262
steps:
6363
- name: Checkout repository
64-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
6565
with:
6666
submodules: 'recursive'
6767

6868
- name: Cache Gradle dependencies
69-
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
69+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
7070
with:
7171
path: |
7272
~/.gradle/caches
@@ -114,7 +114,7 @@ jobs:
114114
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
115115

116116
- name: Upload Trivy scan results to GitHub Security tab
117-
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
117+
uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
118118
if: always()
119119
with:
120120
sarif_file: 'trivy-results.sarif'

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
'comp:',
3131
'inst:',
3232
'tag:',
33+
'mergequeue-status:',
34+
'team:',
3335
'performance:', // To refactor to 'ci: ' in the future
3436
'run-tests:' // Unused since GitLab migration
3537
]
@@ -54,7 +56,7 @@ jobs:
5456
'**This PR is blocked until:**\n' +
5557
'1. The invalid labels are deleted, and\n' +
5658
'2. A maintainer deletes this comment to unblock the PR\n\n' +
57-
'**Note:** Simply removing labels from the pull request is not enough - a maintainer must remove the label and delete this comment to remove the block.\n\n' +
59+
'**Note:** Simply removing labels from the pull request is not enough - a maintainer must delete this comment then remove the label to remove the block.\n\n' +
5860
commentMarker
5961
6062
if (blockingComment) {
@@ -78,5 +80,9 @@ jobs:
7880
}
7981
if (blockingComment) {
8082
// Block the PR by failing the workflow
81-
core.setFailed(`PR blocked: Invalid labels detected: (${invalidLabels.join(', ')}). A maintainer must delete the blocking comment after fixing the labels to allow merging.`)
83+
if (hasInvalidLabels) {
84+
core.setFailed(`PR blocked: Invalid labels detected: (${invalidLabels.join(', ')}). A maintainer must delete the blocking comment after fixing the labels to allow merging.`)
85+
} else {
86+
core.setFailed(`PR blocked: A previous blocking comment still exists. A maintainer must delete it to allow merging.`)
87+
}
8288
}

.github/workflows/create-release-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
echo "branch=release/${TAG%.0}.x" >> "$GITHUB_OUTPUT"
3939
4040
- name: Checkout dd-trace-java at tag
41-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
4242
with:
4343
ref: ${{ steps.determine-tag.outputs.tag }}
4444

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
echo "base_branch=${BASE_BRANCH}" >> $GITHUB_OUTPUT
4646
4747
- name: Checkout the repository
48-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
48+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4949
with:
5050
ref: ${{ steps.define-base-branch.outputs.base_branch }}
5151

@@ -92,7 +92,7 @@ jobs:
9292
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
9393
9494
- name: Push changes
95-
uses: DataDog/commit-headless@583489e08d78037e7fa256c14adf998d5463f6a0 # action/v2.0.2
95+
uses: DataDog/commit-headless@05d7b7ee023e2c7d01c47832d420c2503cd416f3 # action/v2.0.3
9696
with:
9797
token: "${{ steps.octo-sts.outputs.token }}"
9898
branch: "${{ steps.define-branch.outputs.branch }}"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
group: APM Larger Runners
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
2727
with:
2828
submodules: 'recursive'
2929
fetch-depth: 0
3030

3131
- name: Cache Gradle dependencies
32-
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
32+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
3333
with:
3434
path: |
3535
~/.gradle/caches

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

Lines changed: 2 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
- name: Define the Docker build image tag to use
3030
id: define-tag
3131
run: |
@@ -71,7 +71,7 @@ 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@583489e08d78037e7fa256c14adf998d5463f6a0 # action/v2.0.2
74+
uses: DataDog/commit-headless@05d7b7ee023e2c7d01c47832d420c2503cd416f3 # action/v2.0.3
7575
if: steps.check-changes.outputs.commit_changes == 'true'
7676
with:
7777
token: "${{ steps.octo-sts.outputs.token }}"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
policy: self.update-gradle-dependencies.create-pr
2020

2121
- name: Checkout repository
22-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
2323
with:
2424
submodules: "recursive"
2525
- name: Update Gradle dependencies
@@ -59,7 +59,7 @@ jobs:
5959
git commit -m "chore: Update Gradle dependencies"
6060
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
6161
- name: Push changes
62-
uses: DataDog/commit-headless@583489e08d78037e7fa256c14adf998d5463f6a0 # action/v2.0.2
62+
uses: DataDog/commit-headless@05d7b7ee023e2c7d01c47832d420c2503cd416f3 # action/v2.0.3
6363
if: steps.check-changes.outputs.commit_changes == 'true'
6464
with:
6565
token: "${{ steps.octo-sts.outputs.token }}"

0 commit comments

Comments
 (0)