Skip to content

Commit 8575c9a

Browse files
committed
Merge branch 'main' into integration-test-kafka
2 parents 665c390 + b3af09e commit 8575c9a

File tree

52 files changed

+718
-385
lines changed

Some content is hidden

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

52 files changed

+718
-385
lines changed

.clomonitor.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
2+
exemptions:
3+
- check: artifacthub_badge
4+
reason: "Artifact Hub doesn't support Java packages"
5+
- check: openssf_badge
6+
reason: "ETOOMANYBADGES, but the work has been done: https://www.bestpractices.dev/projects/9992"

.fossa.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 3
2+
3+
targets:
4+
only:
5+
- type: gradle
6+
7+
experimental:
8+
gradle:
9+
configurations-only:
10+
# consumer will only be exposed to these dependencies
11+
- runtimeClasspath
File renamed without changes.

.github/renovate.json5

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4-
"config:base"
4+
"config:recommended",
5+
"docker:pinDigests",
6+
"helpers:pinGitHubActionDigests"
57
],
8+
"ignorePresets": [":ignoreModulesAndTests"], // needed to keep maven-extension test pom files up-to-date
69
"packageRules": [
10+
{
11+
// this is to reduce the number of renovate PRs
12+
"matchManagers": [
13+
"github-actions",
14+
"dockerfile"
15+
],
16+
"extends": ["schedule:weekly"],
17+
"groupName": "weekly update"
18+
},
719
{
820
"matchPackageNames": [
921
"io.opentelemetry:**",
@@ -16,14 +28,6 @@
1628
// of that release instead of the unstable version for a future release
1729
"ignoreUnstable": false
1830
},
19-
{
20-
"matchPackagePrefixes": ["ch.qos.logback:"],
21-
"groupName": "logback packages"
22-
},
23-
{
24-
"matchPackagePrefixes": ["io.micrometer:"],
25-
"groupName": "micrometer packages"
26-
},
2731
{
2832
// prevent 3.0.1u2 -> 3.0.1
2933
"matchPackageNames": ["com.google.code.findbugs:annotations"],
@@ -99,5 +103,17 @@
99103
"matchUpdateTypes": ["major"],
100104
"enabled": false,
101105
}
106+
],
107+
"customManagers": [
108+
{
109+
"customType": "regex",
110+
"datasourceTemplate": "npm",
111+
"fileMatch": [
112+
"^.github/workflows/"
113+
],
114+
"matchStrings": [
115+
"npx (?<depName>[^@]+)@(?<currentValue>[^\\s]+)"
116+
]
117+
}
102118
]
103119
}

.github/repository-settings.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Repository settings
22

33
Same
4-
as [opentelemetry-java-instrumentation repository settings](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/.github/repository-settings.md#repository-settings)
5-
,
6-
except that the branch protection rules for `v*` and `gh-pages` are not needed in this repository.
4+
as [opentelemetry-java-instrumentation repository settings](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/.github/repository-settings.md#repository-settings),
5+
except that the rules for `gh-pages` and `cloudfoundry` branches are not relevant in this
6+
repository.

.github/scripts/generate-release-contributors.sh

+1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,5 @@ echo $contributors1 $contributors2 \
8888
| grep -v dependabot \
8989
| grep -v renovate \
9090
| grep -v opentelemetrybot \
91+
| grep -v otelbot \
9192
| sed 's/^/@/'
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash -e
2+
3+
git config user.name otelbot
4+
git config user.email [email protected]

.github/scripts/use-cla-approved-github-bot.sh

-4
This file was deleted.

.github/workflows/assign-reviewers.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ on:
88
# because repository write permission is needed to assign reviewers
99
pull_request_target:
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
assign-reviewers:
16+
permissions:
17+
contents: read
18+
pull-requests: write # for assigning reviewers
1319
runs-on: ubuntu-latest
1420
steps:
15-
- uses: open-telemetry/assign-reviewers-action@main
21+
- uses: open-telemetry/assign-reviewers-action@b101a9c17274e3d4fff0853898007e9e3a366675 # main
1622
with:
1723
config-file: .github/component_owners.yml

.github/workflows/backport.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ on:
66
description: "The pull request # to backport"
77
required: true
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
backport:
14+
permissions:
15+
contents: write # for Git to git push
1116
runs-on: ubuntu-latest
1217
steps:
1318
- run: |
@@ -16,24 +21,30 @@ jobs:
1621
exit 1
1722
fi
1823
19-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2025
with:
2126
# history is needed to run git cherry-pick below
2227
fetch-depth: 0
2328

24-
- name: Use CLA approved github bot
25-
run: .github/scripts/use-cla-approved-github-bot.sh
29+
- name: Use CLA approved bot
30+
run: .github/scripts/use-cla-approved-bot.sh
31+
32+
- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
33+
id: otelbot-token
34+
with:
35+
app-id: ${{ vars.OTELBOT_APP_ID }}
36+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
2637

2738
- name: Create pull request
2839
env:
2940
NUMBER: ${{ github.event.inputs.number }}
3041
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
31-
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
42+
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
3243
run: |
3344
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
3445
title=$(gh pr view $NUMBER --json title --jq .title)
3546
36-
branch="opentelemetrybot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
47+
branch="otelbot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
3748
3849
git checkout -b $branch
3950
git cherry-pick $commit

.github/workflows/build.yml

+17-14
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1316
cancel-in-progress: true
@@ -16,16 +19,16 @@ jobs:
1619
build:
1720
runs-on: ubuntu-latest
1821
steps:
19-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2023

2124
- name: Set up JDK for running Gradle
22-
uses: actions/setup-java@v4
25+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
2326
with:
2427
distribution: temurin
2528
java-version: 17
2629

2730
- name: Set up gradle
28-
uses: gradle/actions/setup-gradle@v4
31+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
2932
with:
3033
cache-read-only: ${{ github.event_name == 'pull_request' }}
3134
- name: Gradle build and test
@@ -43,24 +46,24 @@ jobs:
4346
- 20
4447
fail-fast: false
4548
steps:
46-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4750

4851
- id: setup-test-java
4952
name: Set up JDK ${{ matrix.test-java-version }} for running tests
50-
uses: actions/setup-java@v4
53+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
5154
with:
5255
# using zulu because new releases get published quickly
5356
distribution: zulu
5457
java-version: ${{ matrix.test-java-version }}
5558

5659
- name: Set up JDK for running Gradle
57-
uses: actions/setup-java@v4
60+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
5861
with:
5962
distribution: temurin
6063
java-version: 17
6164

6265
- name: Set up gradle
63-
uses: gradle/actions/setup-gradle@v4
66+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
6467
with:
6568
cache-read-only: ${{ github.event_name == 'pull_request' }}
6669
- name: Gradle test
@@ -73,24 +76,24 @@ jobs:
7376
integration-test:
7477
runs-on: ubuntu-latest
7578
steps:
76-
- uses: actions/checkout@v4
79+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7780

7881
- name: Set up JDK for running Gradle
79-
uses: actions/setup-java@v4
82+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
8083
with:
8184
distribution: temurin
8285
java-version: 17
8386

8487
- name: Set up gradle
85-
uses: gradle/actions/setup-gradle@v4
88+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
8689
with:
8790
cache-read-only: ${{ github.event_name == 'pull_request' }}
8891

8992
- name: Integration test
9093
run: ./gradlew integrationTest
9194

9295
- name: Save integration test results
93-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
9497
if: always()
9598
with:
9699
name: integration-test-results
@@ -125,16 +128,16 @@ jobs:
125128
- integration-test
126129
runs-on: ubuntu-latest
127130
steps:
128-
- uses: actions/checkout@v4
131+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
129132

130133
- name: Set up JDK for running Gradle
131-
uses: actions/setup-java@v4
134+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
132135
with:
133136
distribution: temurin
134137
java-version: 17
135138

136139
- name: Set up gradle
137-
uses: gradle/actions/setup-gradle@v4
140+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
138141
# skipping release branches because the versions in those branches are not snapshots
139142
# (also this skips pull requests)
140143
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java-contrib' }}

.github/workflows/codeql-daily.yml

-45
This file was deleted.

.github/workflows/codeql.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CodeQL
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- release/*
8+
push:
9+
branches:
10+
- main
11+
- release/*
12+
schedule:
13+
- cron: "29 13 * * 2" # weekly at 13:29 UTC on Tuesday
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
analyze:
20+
permissions:
21+
contents: read
22+
actions: read # for github/codeql-action/init to get workflow details
23+
security-events: write # for github/codeql-action/analyze to upload SARIF results
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
28+
- name: Set up Java 17
29+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
30+
with:
31+
distribution: temurin
32+
java-version: 17
33+
34+
- name: Set up gradle
35+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
39+
with:
40+
languages: java, actions
41+
# using "latest" helps to keep up with the latest Kotlin support
42+
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
43+
tools: latest
44+
45+
- name: Assemble
46+
# --no-build-cache is required for codeql to analyze all modules
47+
# --no-daemon is required for codeql to observe the compilation
48+
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
49+
run: ./gradlew assemble --no-build-cache --no-daemon
50+
51+
- name: Perform CodeQL analysis
52+
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9

.github/workflows/fossa.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: FOSSA
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
fossa:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
18+
with:
19+
api-key: ${{secrets.FOSSA_API_KEY}}
20+
team: OpenTelemetry

0 commit comments

Comments
 (0)