Skip to content

Commit b667bc9

Browse files
committed
Merge remote-tracking branch 'upstream/main' into siyuniums/snippet-injection
2 parents a1b42a8 + 33d2e40 commit b667bc9

File tree

677 files changed

+6143
-6302
lines changed

Some content is hidden

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

677 files changed

+6143
-6302
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash -e
2+
3+
grep -Pohr --include '*.java' --exclude-dir=test \"otel.instrumentation.[^\"]+\" \
4+
| grep -v otel.instrumentation.internal \
5+
| sort -u
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash -e
2+
3+
grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
4+
| grep -v :+\" \
5+
| grep -v "// see .* module" \
6+
| grep -v "// documented limitation"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash -e
2+
3+
version=$1
4+
5+
alpha_version=${version}-alpha
6+
7+
sed -Ei "s/val otelVersion = \"[^\"]*\"/val otelVersion = \"$version\"/" dependencyManagement/build.gradle.kts
8+
9+
sed -Ei "s/(opentelemetry *: )\"[^\"]*\"/\1\"$version\"/" examples/distro/build.gradle
10+
sed -Ei "s/(opentelemetryAlpha *: )\"[^\"]*\"/\1\"$alpha_version\"/" examples/distro/build.gradle
11+
12+
sed -Ei "s/(opentelemetry *: )\"[^\"]*\"/\1\"$version\"/" examples/extension/build.gradle
13+
sed -Ei "s/(opentelemetryAlpha *: )\"[^\"]*\"/\1\"$alpha_version\"/" examples/extension/build.gradle

.github/scripts/update-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version=$1
55
if [[ $version == *-SNAPSHOT ]]; then
66
alpha_version=${version//-SNAPSHOT/-alpha-SNAPSHOT}
77
else
8-
alpha_version=$version-alpha
8+
alpha_version=${version}-alpha
99
fi
1010

1111
sed -Ei "s/val stableVersion = \"[^\"]*\"/val stableVersion = \"$version\"/" version.gradle.kts

.github/workflows/pr-smoke-test-play-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
# https://github.com/playframework/playframework/pull/10819
1717
skip-java-17: true
1818
skip-java-18: true
19+
skip-java-19: true
1920

2021
build-java-15:
2122
runs-on: ubuntu-latest

.github/workflows/publish-smoke-test-play-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
# https://github.com/playframework/playframework/pull/10819
2020
skip-java-17: true
2121
skip-java-18: true
22+
skip-java-19: true
2223

2324
publish-java-15:
2425
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,11 @@ jobs:
269269
version: ${{ needs.release.outputs.version }}
270270
secrets:
271271
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
272+
273+
create-java-docs-pull-request:
274+
needs: release
275+
uses: ./.github/workflows/reusable-create-java-docs-pull-request.yml
276+
with:
277+
version: ${{ needs.release.outputs.version }}
278+
secrets:
279+
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}

.github/workflows/reusable-assemble.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,28 @@ jobs:
4040
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
4141
with:
4242
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
43-
arguments: assemble -x javadoc ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
43+
arguments: assemble generateLicenseReport -x javadoc ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
4444
cache-read-only: ${{ inputs.cache-read-only }}
4545
# gradle enterprise is used for the build cache
4646
gradle-home-cache-excludes: caches/build-cache-1
4747

48+
- name: Check licenses
49+
run: |
50+
# add any untracked folders that may have been added by generateLicenseReport
51+
git add licenses
52+
# there's always going to one line difference due to the timestamp included in the report
53+
if [[ $(git diff --cached --shortstat licenses) == " 1 file changed, 1 insertion(+), 1 deletion(-)" ]]
54+
then
55+
echo "Licenses are up-to-date."
56+
else
57+
echo "Licenses are not up-to-date, please run './gradlew generateLicenseReport' locally and commit."
58+
echo
59+
echo $(git diff --cached --stat licenses)
60+
echo
61+
echo $(git diff --cached licenses)
62+
exit 1
63+
fi
64+
4865
- name: Upload deadlock detector artifacts if any
4966
if: always()
5067
uses: actions/upload-artifact@v3

.github/workflows/reusable-create-java-contrib-pull-request.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,25 @@ jobs:
3737
- name: Update version
3838
env:
3939
VERSION: ${{ inputs.version }}
40-
run: |
41-
sed -i "s/^val otelVersion = .*/val otelVersion = \"$VERSION\"/" dependencyManagement/build.gradle.kts
40+
run: ./.github/scripts/update-sdk-version.sh $VERSION
4241

4342
- name: Use CLA approved github bot
44-
run: |
45-
# cannot run the use-cla-approved-github-bot.sh script here since in a different repo
46-
git config user.name opentelemetrybot
47-
git config user.email [email protected]
43+
run: .github/scripts/use-cla-approved-github-bot.sh
4844

4945
- name: Create pull request against opentelemetry-java-contrib
5046
env:
5147
# this is the personal access token used for "gh pr create" below
5248
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
5349
VERSION: ${{ inputs.version }}
5450
run: |
55-
message="Update the SDK version to $VERSION"
56-
body="Update the SDK version to \`$VERSION\`."
51+
message="Update the SDK and instrumentation versions to $VERSION"
52+
body=$(cat << EOF
53+
Update the SDK and instrumentation versions to \`$VERSION\`.
54+
55+
Note: you will likely need to re-run the checks on this PR in an hour or so, once the
56+
updated dependencies are visible in maven central.
57+
EOF
58+
)
5759
5860
# gh pr create doesn't have a way to explicitly specify different head and base
5961
# repositories currently, but it will implicitly pick up the head from a different
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Reusable - Create Java docs pull request
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
type: string
8+
required: true
9+
secrets:
10+
BOT_TOKEN:
11+
required: true
12+
# to help with partial release build failures
13+
workflow_dispatch:
14+
inputs:
15+
version:
16+
description: "Version"
17+
required: true
18+
19+
jobs:
20+
create-java-docs-pull-request:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
repository: opentelemetrybot/opentelemetry-java-docs
26+
# this is the personal access token used for "git push" below
27+
token: ${{ secrets.BOT_TOKEN }}
28+
29+
- name: Initialize pull request branch
30+
env:
31+
VERSION: ${{ inputs.version }}
32+
run: |
33+
git remote add upstream https://github.com/open-telemetry/opentelemetry-java-docs.git
34+
git fetch upstream
35+
git checkout -b update-opentelemetry-sdk-to-${VERSION} upstream/main
36+
37+
- name: Update version
38+
env:
39+
VERSION: ${{ inputs.version }}
40+
run: ./.github/scripts/update-sdk-version.sh $VERSION
41+
42+
- name: Use CLA approved github bot
43+
run: |
44+
# cannot run the use-cla-approved-github-bot.sh script here since in a different repo
45+
git config user.name opentelemetrybot
46+
git config user.email [email protected]
47+
48+
- name: Create pull request against opentelemetry-java-docs
49+
env:
50+
# this is the personal access token used for "gh pr create" below
51+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
52+
VERSION: ${{ inputs.version }}
53+
run: |
54+
message="Update the SDK and instrumentation versions to $VERSION"
55+
body=$(cat << EOF
56+
Update the SDK and instrumentation versions to \`$VERSION\`.
57+
58+
Note: you will likely need to re-run the checks on this PR in an hour or so, once the
59+
updated dependencies are visible in maven central.
60+
EOF
61+
)
62+
63+
# gh pr create doesn't have a way to explicitly specify different head and base
64+
# repositories currently, but it will implicitly pick up the head from a different
65+
# repository if you set up a tracking branch
66+
67+
git commit -a -m "$message"
68+
git push --set-upstream origin HEAD:update-opentelemetry-sdk-to-${VERSION}
69+
gh pr create --title "$message" \
70+
--body "$body" \
71+
--repo open-telemetry/opentelemetry-java-docs \
72+
--base main

0 commit comments

Comments
 (0)