Skip to content

Commit 99c81bb

Browse files
committed
Merge branch 'main' into convert-groovy-javaagent
2 parents 54392de + 6752935 commit 99c81bb

File tree

229 files changed

+5215
-1708
lines changed

Some content is hidden

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

229 files changed

+5215
-1708
lines changed

.fossa.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,9 @@ targets:
619619
- type: gradle
620620
path: ./
621621
target: ':instrumentation:jsf:jsf-myfaces-3.0:javaagent'
622+
- type: gradle
623+
path: ./
624+
target: ':instrumentation:kafka:kafka-connect-2.6:javaagent'
622625
- type: gradle
623626
path: ./
624627
target: ':instrumentation:kafka:kafka-streams-0.11:javaagent'

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ test native:
22
- all:
33
- changed-files:
44
- any-glob-to-any-file:
5-
- instrumentation/logback/logback-appender-10/library/**
5+
- instrumentation/logback/logback-appender-1.0/library/**
66
- instrumentation/jdbc/library/**
77
- instrumentation/spring/**
88
- smoke-tests-otel-starter/**

.github/repository-settings.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ private admin repo.
1010

1111
- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
1212
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
13+
- `DEVELOCITY_ACCESS_KEY` - owned by [@trask](https://github.com/trask)
14+
- Generated at https://develocity.opentelemetry.io > My settings > Access keys
15+
- Format of env var is `develocity.opentelemetry.io=<access key>`,
16+
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)
1317
- `GRADLE_PUBLISH_KEY`
1418
- `GRADLE_PUBLISH_SECRET`
1519
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password

.github/scripts/draft-change-log-entries.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,29 @@ if [[ $minor == 0 ]]; then
1515
prior_minor=$(sed -n "s/^## Version $prior_major\.\([0-9]\+\)\..*/\1/p" CHANGELOG.md | head -1)
1616
if [[ -z $prior_minor ]]; then
1717
# assuming this is the first release
18-
range=
18+
range=HEAD
1919
else
2020
range="v$prior_major.$prior_minor.0..HEAD"
2121
fi
2222
else
2323
range="v$major.$((minor - 1)).0..HEAD"
2424
fi
2525

26-
echo "## Unreleased"
27-
echo
28-
echo "### Migration notes"
26+
echo "# Changelog"
2927
echo
28+
echo "## Unreleased"
3029
echo
30+
31+
"$(dirname "$0")/extract-labeled-prs.sh" "$range"
32+
3133
echo "### 🌟 New javaagent instrumentation"
3234
echo
33-
echo
3435
echo "### 🌟 New library instrumentation"
3536
echo
36-
echo
3737
echo "### 📈 Enhancements"
3838
echo
39-
echo
4039
echo "### 🛠️ Bug fixes"
4140
echo
42-
echo
4341
echo "### 🧰 Tooling"
4442
echo
4543

@@ -48,4 +46,5 @@ git log --reverse \
4846
--author='^(?!renovate\[bot\] )' \
4947
--pretty=format:"- %s" \
5048
"$range" \
51-
| sed -E 's,\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),'
49+
| sed -E 's, *\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),'
50+
echo
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/bin/bash -e
2+
3+
# This script extracts PRs with "breaking change" and "deprecation" labels for the given version range
4+
# Usage: extract-labeled-prs.sh [git-range]
5+
# If no range is provided, it uses HEAD
6+
7+
range="${1:-HEAD}"
8+
9+
# Get the date range for filtering
10+
if [[ "$range" == "HEAD" ]]; then
11+
# Get all commits from HEAD
12+
oldest_commit=$(git log --reverse --pretty=format:"%H" HEAD | head -1)
13+
since_date=$(git show -s --format=%ci "$oldest_commit" | cut -d' ' -f1)
14+
else
15+
# Get commits in the specified range
16+
if [[ $range =~ ^(.+)\.\.(.+)$ ]]; then
17+
from_ref="${BASH_REMATCH[1]}"
18+
oldest_commit=$(git rev-parse "$from_ref")
19+
since_date=$(git show -s --format=%ci "$oldest_commit" | cut -d' ' -f1)
20+
else
21+
echo "[ERROR] Invalid range format: $range" >&2
22+
exit 1
23+
fi
24+
fi
25+
26+
# Initialize tracking variables
27+
breaking_changes=""
28+
deprecations=""
29+
breaking_changes_found=false
30+
deprecations_found=false
31+
32+
# Get PRs with "breaking change" label using GitHub search
33+
breaking_prs=$(gh pr list \
34+
--repo open-telemetry/opentelemetry-java-instrumentation \
35+
--label "breaking change" \
36+
--state merged \
37+
--search "merged:>=$since_date" \
38+
--json number,title \
39+
--jq '.[] | "\(.number)|\(.title)"' 2>/dev/null || echo "")
40+
41+
if [[ -n "$breaking_prs" ]]; then
42+
breaking_changes_found=true
43+
while IFS='|' read -r pr_number pr_title; do
44+
breaking_changes+="- $pr_title"$'\n'" ([#$pr_number](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/$pr_number))"$'\n'
45+
done <<< "$breaking_prs"
46+
fi
47+
48+
# Get PRs with "deprecation" label using GitHub search
49+
deprecation_prs=$(gh pr list \
50+
--repo open-telemetry/opentelemetry-java-instrumentation \
51+
--label "deprecation" \
52+
--state merged \
53+
--search "merged:>=$since_date" \
54+
--json number,title \
55+
--jq '.[] | "\(.number)|\(.title)"' 2>/dev/null || echo "")
56+
57+
if [[ -n "$deprecation_prs" ]]; then
58+
deprecations_found=true
59+
while IFS='|' read -r pr_number pr_title; do
60+
deprecations+="- $pr_title"$'\n'" ([#$pr_number](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/$pr_number))"$'\n'
61+
done <<< "$deprecation_prs"
62+
fi
63+
64+
# Output breaking changes section
65+
if [[ "$breaking_changes_found" == "true" ]]; then
66+
echo "### ⚠️ Breaking Changes"
67+
echo
68+
echo -n "$breaking_changes"
69+
echo
70+
fi
71+
72+
# Output deprecations section
73+
if [[ "$deprecations_found" == "true" ]]; then
74+
echo "### 🚫 Deprecations"
75+
echo
76+
echo -n "$deprecations"
77+
echo
78+
fi

.github/workflows/build-common.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
type: boolean
1717
required: false
1818
secrets:
19+
DEVELOCITY_ACCESS_KEY:
20+
required: false
1921
FLAKY_TEST_REPORTER_ACCESS_KEY:
2022
required: false
2123

@@ -43,6 +45,8 @@ jobs:
4345
cache-read-only: ${{ inputs.cache-read-only }}
4446

4547
- name: Spotless
48+
env:
49+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
4650
run: ./gradlew spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
4751

4852
license-check:
@@ -65,6 +69,8 @@ jobs:
6569
cache-read-only: ${{ inputs.cache-read-only }}
6670

6771
- name: Generate license report
72+
env:
73+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
6874
# with the build cache enabled occasionally produces outdated results
6975
run: ./gradlew generateLicenseReport --no-build-cache
7076

@@ -192,6 +198,8 @@ jobs:
192198
cache-read-only: ${{ inputs.cache-read-only }}
193199

194200
- name: Build
201+
env:
202+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
195203
run: ./gradlew check javadoc sourcesJar spdxSbom -x spotlessCheck -PskipTests=true ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
196204

197205
- name: Check for jApiCmp diffs
@@ -275,7 +283,7 @@ jobs:
275283

276284
# vaadin 14 tests fail with node 18
277285
- name: Set up Node
278-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
286+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
279287
with:
280288
node-version: 16
281289

@@ -296,6 +304,8 @@ jobs:
296304
cache-read-only: ${{ inputs.cache-read-only || matrix.test-java-version != 11 || matrix.vm != 'hotspot' }}
297305

298306
- name: List tests
307+
env:
308+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
299309
# "check" is needed to activate all tests for listing purposes
300310
# listTestsInPartition writes test tasks that apply to the given partition to a file named
301311
# "test-tasks.txt" and then disables all tasks (including tests) after it runs
@@ -310,6 +320,8 @@ jobs:
310320
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
311321
312322
- name: Test
323+
env:
324+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
313325
# spotless is checked separately since it's a common source of failure
314326
run: >
315327
./gradlew
@@ -432,11 +444,15 @@ jobs:
432444
cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }}
433445

434446
- name: Build
447+
env:
448+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
435449
# running suite "none" compiles everything needed by smoke tests without executing any tests
436450
# --no-daemon is used to free up the memory from the build step before running the test step below
437451
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none --no-daemon ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
438452

439453
- name: Test
454+
env:
455+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
440456
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }} ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
441457

442458
- name: Build scan

.github/workflows/build-daily-no-build-cache.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ jobs:
1515
with:
1616
no-build-cache: true
1717
secrets:
18+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1819
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
1920

2021
test-latest-deps:
2122
uses: ./.github/workflows/reusable-test-latest-deps.yml
2223
with:
2324
no-build-cache: true
2425
secrets:
26+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2527
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
2628

2729
# muzzle is not included here because it doesn't use gradle cache anyway and so is already covered

.github/workflows/build-daily.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ jobs:
1313
common:
1414
uses: ./.github/workflows/build-common.yml
1515
secrets:
16+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1617
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
1718

1819
test-latest-deps:
1920
uses: ./.github/workflows/reusable-test-latest-deps.yml
2021
secrets:
22+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2123
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
2224

2325
muzzle:

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
common:
1515
uses: ./.github/workflows/build-common.yml
1616
secrets:
17+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1718
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
1819

1920
test-latest-deps:
@@ -23,6 +24,7 @@ jobs:
2324
if: "!startsWith(github.ref_name, 'release/')"
2425
uses: ./.github/workflows/reusable-test-latest-deps.yml
2526
secrets:
27+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2628
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
2729

2830
muzzle:
@@ -80,6 +82,7 @@ jobs:
8082

8183
- name: Build and publish artifact snapshots
8284
env:
85+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
8386
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
8487
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
8588
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
@@ -88,6 +91,7 @@ jobs:
8891

8992
- name: Build and publish gradle plugin snapshots
9093
env:
94+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
9195
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
9296
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
9397
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
include:
3333
- language: actions
3434
- language: java
35-
runs-on: oracle-8cpu-32gb-x86-64
35+
runs-on: oracle-vm-8cpu-32gb-x86-64
3636
steps:
3737
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3838

@@ -63,7 +63,7 @@ jobs:
6363
cache-read-only: ${{ github.event_name == 'pull_request' }}
6464

6565
- name: Initialize CodeQL
66-
uses: github/codeql-action/init@755f44910c12a3d7ca0d8c6e42c048b3362f7cec # v3.30.8
66+
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
6767
with:
6868
languages: ${{ matrix.language }}
6969
# using "linked" helps to keep up with the linked Kotlin support
@@ -84,6 +84,6 @@ jobs:
8484
--no-build-cache --no-daemon
8585
8686
- name: Perform CodeQL analysis
87-
uses: github/codeql-action/analyze@755f44910c12a3d7ca0d8c6e42c048b3362f7cec # v3.30.8
87+
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
8888
with:
8989
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)