Skip to content

Commit 4e5db98

Browse files
authored
Merge branch 'main' into aw/grpc-exporter-configurable-backoff
2 parents 86ee1da + 5a821ac commit 4e5db98

File tree

123 files changed

+3509
-1661
lines changed

Some content is hidden

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

123 files changed

+3509
-1661
lines changed

.github/workflows/contrib.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ on:
66
- 'release/*'
77
pull_request:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
contrib_0:
1115
uses: open-telemetry/opentelemetry-python-contrib/.github/workflows/core_contrib_test_0.yml@main
1216
with:
1317
CORE_REPO_SHA: ${{ github.sha }}
14-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

17-
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
17+
- uses: fossas/fossa-action@c0a7d013f84c8ee5e910593186598625513cc1e4 # v1.6.0
1818
with:
1919
api-key: ${{secrets.FOSSA_API_KEY}}
2020
team: OpenTelemetry

.github/workflows/lint_0.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,29 @@ on:
99
- 'release/*'
1010
pull_request:
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
1216
env:
1317
CORE_REPO_SHA: main
14-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}
1527
PIP_EXISTS_ACTION: w
1628

1729
jobs:
1830

1931
lint-opentelemetry-api:
2032
name: opentelemetry-api
2133
runs-on: ubuntu-latest
34+
timeout-minutes: 30
2235
steps:
2336
- name: Checkout repo @ SHA - ${{ github.sha }}
2437
uses: actions/checkout@v4
@@ -37,6 +50,7 @@ jobs:
3750
lint-opentelemetry-proto-protobuf5:
3851
name: opentelemetry-proto-protobuf5
3952
runs-on: ubuntu-latest
53+
timeout-minutes: 30
4054
steps:
4155
- name: Checkout repo @ SHA - ${{ github.sha }}
4256
uses: actions/checkout@v4
@@ -55,6 +69,7 @@ jobs:
5569
lint-opentelemetry-sdk:
5670
name: opentelemetry-sdk
5771
runs-on: ubuntu-latest
72+
timeout-minutes: 30
5873
steps:
5974
- name: Checkout repo @ SHA - ${{ github.sha }}
6075
uses: actions/checkout@v4
@@ -73,6 +88,7 @@ jobs:
7388
lint-opentelemetry-semantic-conventions:
7489
name: opentelemetry-semantic-conventions
7590
runs-on: ubuntu-latest
91+
timeout-minutes: 30
7692
steps:
7793
- name: Checkout repo @ SHA - ${{ github.sha }}
7894
uses: actions/checkout@v4
@@ -91,6 +107,7 @@ jobs:
91107
lint-opentelemetry-getting-started:
92108
name: opentelemetry-getting-started
93109
runs-on: ubuntu-latest
110+
timeout-minutes: 30
94111
steps:
95112
- name: Checkout repo @ SHA - ${{ github.sha }}
96113
uses: actions/checkout@v4
@@ -109,6 +126,7 @@ jobs:
109126
lint-opentelemetry-opentracing-shim:
110127
name: opentelemetry-opentracing-shim
111128
runs-on: ubuntu-latest
129+
timeout-minutes: 30
112130
steps:
113131
- name: Checkout repo @ SHA - ${{ github.sha }}
114132
uses: actions/checkout@v4
@@ -127,6 +145,7 @@ jobs:
127145
lint-opentelemetry-opencensus-shim:
128146
name: opentelemetry-opencensus-shim
129147
runs-on: ubuntu-latest
148+
timeout-minutes: 30
130149
steps:
131150
- name: Checkout repo @ SHA - ${{ github.sha }}
132151
uses: actions/checkout@v4
@@ -145,6 +164,7 @@ jobs:
145164
lint-opentelemetry-exporter-opencensus:
146165
name: opentelemetry-exporter-opencensus
147166
runs-on: ubuntu-latest
167+
timeout-minutes: 30
148168
steps:
149169
- name: Checkout repo @ SHA - ${{ github.sha }}
150170
uses: actions/checkout@v4
@@ -163,6 +183,7 @@ jobs:
163183
lint-opentelemetry-exporter-otlp-proto-common:
164184
name: opentelemetry-exporter-otlp-proto-common
165185
runs-on: ubuntu-latest
186+
timeout-minutes: 30
166187
steps:
167188
- name: Checkout repo @ SHA - ${{ github.sha }}
168189
uses: actions/checkout@v4
@@ -181,6 +202,7 @@ jobs:
181202
lint-opentelemetry-exporter-otlp-combined:
182203
name: opentelemetry-exporter-otlp-combined
183204
runs-on: ubuntu-latest
205+
timeout-minutes: 30
184206
steps:
185207
- name: Checkout repo @ SHA - ${{ github.sha }}
186208
uses: actions/checkout@v4
@@ -199,6 +221,7 @@ jobs:
199221
lint-opentelemetry-exporter-otlp-proto-grpc:
200222
name: opentelemetry-exporter-otlp-proto-grpc
201223
runs-on: ubuntu-latest
224+
timeout-minutes: 30
202225
steps:
203226
- name: Checkout repo @ SHA - ${{ github.sha }}
204227
uses: actions/checkout@v4
@@ -217,6 +240,7 @@ jobs:
217240
lint-opentelemetry-exporter-otlp-proto-http:
218241
name: opentelemetry-exporter-otlp-proto-http
219242
runs-on: ubuntu-latest
243+
timeout-minutes: 30
220244
steps:
221245
- name: Checkout repo @ SHA - ${{ github.sha }}
222246
uses: actions/checkout@v4
@@ -235,6 +259,7 @@ jobs:
235259
lint-opentelemetry-exporter-prometheus:
236260
name: opentelemetry-exporter-prometheus
237261
runs-on: ubuntu-latest
262+
timeout-minutes: 30
238263
steps:
239264
- name: Checkout repo @ SHA - ${{ github.sha }}
240265
uses: actions/checkout@v4
@@ -253,6 +278,7 @@ jobs:
253278
lint-opentelemetry-exporter-zipkin-combined:
254279
name: opentelemetry-exporter-zipkin-combined
255280
runs-on: ubuntu-latest
281+
timeout-minutes: 30
256282
steps:
257283
- name: Checkout repo @ SHA - ${{ github.sha }}
258284
uses: actions/checkout@v4
@@ -271,6 +297,7 @@ jobs:
271297
lint-opentelemetry-exporter-zipkin-proto-http:
272298
name: opentelemetry-exporter-zipkin-proto-http
273299
runs-on: ubuntu-latest
300+
timeout-minutes: 30
274301
steps:
275302
- name: Checkout repo @ SHA - ${{ github.sha }}
276303
uses: actions/checkout@v4
@@ -289,6 +316,7 @@ jobs:
289316
lint-opentelemetry-exporter-zipkin-json:
290317
name: opentelemetry-exporter-zipkin-json
291318
runs-on: ubuntu-latest
319+
timeout-minutes: 30
292320
steps:
293321
- name: Checkout repo @ SHA - ${{ github.sha }}
294322
uses: actions/checkout@v4
@@ -307,6 +335,7 @@ jobs:
307335
lint-opentelemetry-propagator-b3:
308336
name: opentelemetry-propagator-b3
309337
runs-on: ubuntu-latest
338+
timeout-minutes: 30
310339
steps:
311340
- name: Checkout repo @ SHA - ${{ github.sha }}
312341
uses: actions/checkout@v4
@@ -325,6 +354,7 @@ jobs:
325354
lint-opentelemetry-propagator-jaeger:
326355
name: opentelemetry-propagator-jaeger
327356
runs-on: ubuntu-latest
357+
timeout-minutes: 30
328358
steps:
329359
- name: Checkout repo @ SHA - ${{ github.sha }}
330360
uses: actions/checkout@v4
@@ -343,6 +373,7 @@ jobs:
343373
lint-opentelemetry-test-utils:
344374
name: opentelemetry-test-utils
345375
runs-on: ubuntu-latest
376+
timeout-minutes: 30
346377
steps:
347378
- name: Checkout repo @ SHA - ${{ github.sha }}
348379
uses: actions/checkout@v4

.github/workflows/misc_0.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,29 @@ on:
99
- 'release/*'
1010
pull_request:
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
1216
env:
1317
CORE_REPO_SHA: main
14-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}
1527
PIP_EXISTS_ACTION: w
1628

1729
jobs:
1830

1931
spellcheck:
2032
name: spellcheck
2133
runs-on: ubuntu-latest
34+
timeout-minutes: 30
2235
steps:
2336
- name: Checkout repo @ SHA - ${{ github.sha }}
2437
uses: actions/checkout@v4
@@ -37,6 +50,7 @@ jobs:
3750
tracecontext:
3851
name: tracecontext
3952
runs-on: ubuntu-latest
53+
timeout-minutes: 30
4054
steps:
4155
- name: Checkout repo @ SHA - ${{ github.sha }}
4256
uses: actions/checkout@v4
@@ -55,6 +69,7 @@ jobs:
5569
mypy:
5670
name: mypy
5771
runs-on: ubuntu-latest
72+
timeout-minutes: 30
5873
steps:
5974
- name: Checkout repo @ SHA - ${{ github.sha }}
6075
uses: actions/checkout@v4
@@ -73,6 +88,7 @@ jobs:
7388
mypyinstalled:
7489
name: mypyinstalled
7590
runs-on: ubuntu-latest
91+
timeout-minutes: 30
7692
steps:
7793
- name: Checkout repo @ SHA - ${{ github.sha }}
7894
uses: actions/checkout@v4
@@ -91,6 +107,7 @@ jobs:
91107
typecheck:
92108
name: typecheck
93109
runs-on: ubuntu-latest
110+
timeout-minutes: 30
94111
steps:
95112
- name: Checkout repo @ SHA - ${{ github.sha }}
96113
uses: actions/checkout@v4
@@ -109,6 +126,7 @@ jobs:
109126
docs:
110127
name: docs
111128
runs-on: ubuntu-latest
129+
timeout-minutes: 30
112130
if: |
113131
github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
114132
steps:
@@ -129,6 +147,7 @@ jobs:
129147
docker-tests-otlpexporter:
130148
name: docker-tests-otlpexporter
131149
runs-on: ubuntu-latest
150+
timeout-minutes: 30
132151
steps:
133152
- name: Checkout repo @ SHA - ${{ github.sha }}
134153
uses: actions/checkout@v4
@@ -147,6 +166,7 @@ jobs:
147166
docker-tests-opencensus:
148167
name: docker-tests-opencensus
149168
runs-on: ubuntu-latest
169+
timeout-minutes: 30
150170
steps:
151171
- name: Checkout repo @ SHA - ${{ github.sha }}
152172
uses: actions/checkout@v4
@@ -165,6 +185,7 @@ jobs:
165185
public-symbols-check:
166186
name: public-symbols-check
167187
runs-on: ubuntu-latest
188+
timeout-minutes: 30
168189
if: |
169190
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
170191
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
@@ -197,6 +218,7 @@ jobs:
197218
shellcheck:
198219
name: shellcheck
199220
runs-on: ubuntu-latest
221+
timeout-minutes: 30
200222
steps:
201223
- name: Checkout repo @ SHA - ${{ github.sha }}
202224
uses: actions/checkout@v4
@@ -215,6 +237,7 @@ jobs:
215237
generate-workflows:
216238
name: generate-workflows
217239
runs-on: ubuntu-latest
240+
timeout-minutes: 30
218241
if: |
219242
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
220243
&& github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
@@ -239,6 +262,7 @@ jobs:
239262
precommit:
240263
name: precommit
241264
runs-on: ubuntu-latest
265+
timeout-minutes: 30
242266
steps:
243267
- name: Checkout repo @ SHA - ${{ github.sha }}
244268
uses: actions/checkout@v4
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: OSSF Scorecard
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: "16 11 * * 4" # once a week
9+
workflow_dispatch:
10+
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
# Needed for Code scanning upload
18+
security-events: write
19+
# Needed for GitHub OIDC token if publish_results is true
20+
id-token: write
21+
steps:
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
with:
24+
persist-credentials: false
25+
26+
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
27+
with:
28+
results_file: results.sarif
29+
results_format: sarif
30+
publish_results: true
31+
32+
# Upload the results as artifacts (optional). Commenting out will disable
33+
# uploads of run results in SARIF format to the repository Actions tab.
34+
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
35+
- name: "Upload artifact"
36+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
37+
with:
38+
name: SARIF file
39+
path: results.sarif
40+
retention-days: 5
41+
42+
# Upload the results to GitHub's code scanning dashboard (optional).
43+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
44+
- name: "Upload to code-scanning"
45+
uses: github/codeql-action/upload-sarif@5f8171a638ada777af81d42b55959a643bb29017 # v3.28.12
46+
with:
47+
sarif_file: results.sarif

.github/workflows/prepare-patch-release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
run: .github/scripts/use-cla-approved-github-bot.sh
6666

6767
- name: Create pull request
68+
id: create_pr
6869
env:
6970
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
7071
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
@@ -74,7 +75,15 @@ jobs:
7475
7576
git commit -a -m "$message"
7677
git push origin HEAD:$branch
77-
gh pr create --title "[$GITHUB_REF_NAME] $message" \
78+
pr_url=$(gh pr create --title "[$GITHUB_REF_NAME] $message" \
7879
--body "$message." \
7980
--head $branch \
80-
--base $GITHUB_REF_NAME
81+
--base $GITHUB_REF_NAME)
82+
83+
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
84+
- name: Add prepare-release label to PR
85+
if: steps.create_pr.outputs.pr_url != ''
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
run: |
89+
gh pr edit ${{ steps.create_pr.outputs.pr_url }} --add-label "prepare-release"

0 commit comments

Comments
 (0)