Skip to content

Commit f1b3c36

Browse files
authored
Merge branch 'main' into main
2 parents f8415fd + c1394b1 commit f1b3c36

697 files changed

Lines changed: 10922 additions & 9440 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.

.changelog/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.gitignore

.changelog/5017.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add missing `.rst` files to Sphinx documentation build for SDK logs,
2+
propagators, and exporter submodules.

.changelog/5216.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-sdk`: add pull metric reader support to declarative file configuration, including Prometheus metric reader via the `prometheus_development` config field

.changelog/5223.changed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-proto`: regenerate protobuf code from opentelemetry-proto v1.10.0

.changelog/5224.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-proto-json`: update to use opentelemetry-proto v1.10.0

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Switch to SPDX license headers (#5177)
2+
4d978892d3253da1d6f4e6e6abfbe1e1bee87b05
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Add PR to project board
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
add-to-project:
12+
name: add to project board
13+
runs-on: ubuntu-latest
14+
if: github.event.pull_request.draft == false
15+
steps:
16+
# NOTE: do NOT add an actions/checkout step here. This workflow uses
17+
# pull_request_target (which has access to secrets) but must never
18+
# execute code from the fork branch. See PR #4955 for context.
19+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
20+
id: otelbot-token
21+
with:
22+
app-id: ${{ vars.OTELBOT_PYTHON_APP_ID }}
23+
private-key: ${{ secrets.OTELBOT_PYTHON_PRIVATE_KEY }}
24+
25+
- uses: actions/add-to-project@v1.0.2
26+
with:
27+
project-url: https://github.com/orgs/open-telemetry/projects/88
28+
github-token: ${{ steps.otelbot-token.outputs.token }}

.github/workflows/changelog.yml

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# This action requires that any PR targeting the main branch should touch at
2-
# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip
3-
# Changelog" label to disable this action.
1+
# This action requires that any PR targeting the main branch should add a
2+
# changelog fragment file in the .changelog/ directory. If a changelog entry
3+
# is not required, add the "Skip Changelog" label to disable this action.
44

55
name: changelog
66

@@ -9,6 +9,7 @@ on:
99
types: [opened, synchronize, reopened, labeled, unlabeled]
1010
branches:
1111
- main
12+
merge_group:
1213

1314
permissions:
1415
contents: read
@@ -17,23 +18,70 @@ jobs:
1718
changelog:
1819
runs-on: ubuntu-latest
1920
if: |
21+
github.event_name != 'merge_group' &&
2022
!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')
2123
&& github.actor != 'otelbot[bot]'
2224
2325
steps:
2426
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
2529

26-
- name: Check for CHANGELOG changes
30+
- name: Fetch base branch
31+
run: git fetch origin ${{ github.base_ref }} --depth=1
32+
33+
- name: Ensure no direct changes to CHANGELOG.md
2734
run: |
28-
# Only the latest commit of the feature branch is available
29-
# automatically. To diff with the base branch, we need to
30-
# fetch that too (and we only need its latest commit).
31-
git fetch origin ${{ github.base_ref }} --depth=1
32-
if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]]
35+
if [[ $(git diff --name-only FETCH_HEAD -- 'CHANGELOG.md') ]]
3336
then
34-
echo "A CHANGELOG was modified. Looks good!"
35-
else
36-
echo "No CHANGELOG was modified."
37-
echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required."
37+
echo "CHANGELOG.md should not be directly modified."
38+
echo "Please add a changelog fragment file to the .changelog/ directory instead."
39+
echo "See CONTRIBUTING.md for details."
40+
echo ""
41+
echo "Or add the \"Skip Changelog\" label if this job should be skipped."
42+
false
43+
fi
44+
45+
- name: Install towncrier
46+
run: pip install towncrier==25.8.0
47+
48+
- name: Check for changelog fragment
49+
run: |
50+
if ! towncrier check --compare-with origin/${{ github.base_ref }}; then
51+
echo ""
52+
echo "No changelog fragment found for this PR."
53+
echo "Add a file named .changelog/${{ github.event.pull_request.number }}.<type>"
54+
echo "where <type> is one of: added, changed, deprecated, removed, fixed"
55+
echo "See CONTRIBUTING.md for details."
56+
echo ""
57+
echo "Or add the \"Skip Changelog\" label if this job should be skipped."
3858
false
3959
fi
60+
61+
- name: Validate fragment filenames
62+
env:
63+
PR_NUMBER: ${{ github.event.pull_request.number }}
64+
run: |
65+
fragments=$(git diff --diff-filter=A --name-only origin/${{ github.base_ref }} -- '.changelog/*' | grep -v '/\.gitignore$' || true)
66+
[ -z "$fragments" ] && exit 0
67+
invalid=()
68+
while IFS= read -r f; do
69+
base=$(basename "$f")
70+
if [[ ! "$base" =~ ^([0-9]+)\.(added|changed|deprecated|removed|fixed)$ ]]; then
71+
invalid+=("$f (expected <PR_NUMBER>.<type>; type one of added, changed, deprecated, removed, fixed)")
72+
continue
73+
fi
74+
if [[ "${BASH_REMATCH[1]}" != "${PR_NUMBER}" ]]; then
75+
invalid+=("$f (PR number ${BASH_REMATCH[1]} does not match this PR's number ${PR_NUMBER})")
76+
fi
77+
done <<< "$fragments"
78+
if (( ${#invalid[@]} > 0 )); then
79+
echo "Invalid changelog fragment(s):"
80+
for msg in "${invalid[@]}"; do
81+
echo " $msg"
82+
done
83+
exit 1
84+
fi
85+
86+
- name: Preview changelog
87+
run: towncrier build --draft --version Unreleased

.github/workflows/check-links.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,24 @@ on:
1313
- '**/*.rst'
1414
- '.github/workflows/check-links.yml'
1515
- '.github/workflows/check_links_config.json'
16+
merge_group:
17+
paths:
18+
- '**/*.md'
19+
- '**/*.rst'
20+
- '.github/workflows/check-links.yml'
21+
- '.github/workflows/check_links_config.json'
1622

1723
permissions:
1824
contents: read
1925

2026
concurrency:
21-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_sha || github.run_id }}
2228
cancel-in-progress: true
2329

30+
env:
31+
# Diff against merge group SHAs in queue, or PR base branch otherwise
32+
DIFF_RANGE: ${{ github.event_name == 'merge_group' && format('{0}...{1}', github.event.merge_group.base_sha, github.event.merge_group.head_sha) || format('origin/{0}...HEAD', github.base_ref) }}
33+
2434
jobs:
2535
check-links:
2636
runs-on: ubuntu-latest
@@ -29,6 +39,8 @@ jobs:
2939
steps:
3040
- name: Checkout Repo
3141
uses: actions/checkout@v6
42+
with:
43+
fetch-depth: 0
3244

3345
- name: Get changed markdown files
3446
id: changed-files
@@ -42,11 +54,41 @@ jobs:
4254
if: steps.changed-files.outputs.any_changed == 'true'
4355
run: npm install -g markdown-link-check@v3.12.2
4456

45-
- name: Run markdown-link-check
46-
if: steps.changed-files.outputs.any_changed == 'true'
57+
- name: Check links on push to main
58+
if: steps.changed-files.outputs.any_changed == 'true' && github.event_name == 'push'
4759
run: |
4860
markdown-link-check \
4961
--verbose \
5062
--config .github/workflows/check_links_config.json \
5163
${{ steps.changed-files.outputs.all_changed_files }} \
52-
|| { echo "Check that anchor links are lowercase"; exit 1; }
64+
|| { echo "Check that anchor links are lowercase"; exit 1; }
65+
66+
- name: Check new links only on pull requests and merge groups
67+
if: steps.changed-files.outputs.any_changed == 'true' && (github.event_name == 'pull_request' || github.event_name == 'merge_group')
68+
run: |
69+
# Extract URLs only from added lines in the diff to avoid
70+
# rate limiting when checking all links in large files like
71+
# CHANGELOG.md. Only new/changed links are checked on PRs;
72+
# pushes to main still check all links in changed files.
73+
git diff "$DIFF_RANGE" -- \
74+
${{ steps.changed-files.outputs.all_changed_files }} \
75+
| grep '^+' | grep -v '^+++' \
76+
| grep -oP 'https?://[^\s\)\]\"'"'"'`>]+' \
77+
| sort -u > /tmp/new_links.txt
78+
79+
if [ ! -s /tmp/new_links.txt ]; then
80+
echo "No new links found in diff, skipping check"
81+
exit 0
82+
fi
83+
84+
echo "Checking $(wc -l < /tmp/new_links.txt) new links:"
85+
cat /tmp/new_links.txt
86+
87+
# Write links as markdown so markdown-link-check can parse them
88+
awk '{print "- <" $0 ">"}' /tmp/new_links.txt > /tmp/new_links.md
89+
90+
markdown-link-check \
91+
--verbose \
92+
--config .github/workflows/check_links_config.json \
93+
/tmp/new_links.md \
94+
|| { echo "Check that anchor links are lowercase"; exit 1; }

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- 'main'
1010
pull_request:
11+
merge_group:
1112

1213
permissions:
1314
contents: read
@@ -42,7 +43,11 @@ jobs:
4243
- contrib
4344
runs-on: ubuntu-latest
4445
steps:
46+
# Skip alls-green check for post-release version bumps in merge_group.
47+
# This avoids a deadlock where core and contrib repos wait for each other's releases.
48+
# See RELEASING.md for more details.
4549
- name: Decide whether the needed jobs succeeded or failed
50+
if: ${{ !(github.event_name == 'merge_group' && contains(github.event.merge_group.head_commit.message, 'Update version to')) }}
4651
uses: re-actors/alls-green@release/v1
4752
with:
4853
jobs: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)