From 976ff62667b2f62053f793d21295d4bf37a6408a Mon Sep 17 00:00:00 2001 From: manvi Date: Thu, 12 Mar 2026 15:55:59 +0530 Subject: [PATCH 1/4] ci: fix conditional expression in check-links workflow --- .github/workflows/check-links.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index aadb6d5651c..f7b94a4d37f 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -26,9 +26,12 @@ jobs: check-links: runs-on: ubuntu-latest needs: changedfiles - if: | - github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request' - && ${{needs.changedfiles.outputs.md}} + if: >- + ${{ + github.event.pull_request.user.login != 'otelbot[bot]' && + github.event_name == 'pull_request' && + needs.changedfiles.outputs.md + }} steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -43,5 +46,5 @@ jobs: markdown-link-check \ --verbose \ --config .github/workflows/check_links_config.json \ - ${{needs.changedfiles.outputs.md}} \ + ${{ needs.changedfiles.outputs.md }} \ || { echo "Check that anchor links are lowercase"; exit 1; } From 7953c952243f27cda696e3ef26cb5b4f552d9f80 Mon Sep 17 00:00:00 2001 From: manvi Date: Fri, 13 Mar 2026 16:06:37 +0530 Subject: [PATCH 2/4] ci: improve check-links workflow --- .github/workflows/check-links.yml | 47 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index f7b94a4d37f..b9e968e2d8b 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -3,48 +3,45 @@ on: push: branches: [ main ] pull_request: + paths: + - '**/*.md' + - '.github/workflows/check-links.yml' + - '.github/workflows/check_links_config.json' permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + jobs: - changedfiles: - name: changed files - runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' }} - outputs: - md: ${{ steps.changes.outputs.md }} - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Get changed files - id: changes - run: | - echo "md=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)" >> $GITHUB_OUTPUT check-links: runs-on: ubuntu-latest - needs: changedfiles - if: >- - ${{ - github.event.pull_request.user.login != 'otelbot[bot]' && - github.event_name == 'pull_request' && - needs.changedfiles.outputs.md - }} + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'otelbot[bot]' }} + timeout-minutes: 15 steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 + - name: Get changed markdown files + id: changed-files + uses: tj-actions/changed-files@v46 + with: + files: | + **/*.md + - name: Install markdown-link-check + if: steps.changed-files.outputs.any_changed == 'true' run: npm install -g markdown-link-check@v3.12.2 - name: Run markdown-link-check + if: steps.changed-files.outputs.any_changed == 'true' run: | markdown-link-check \ --verbose \ --config .github/workflows/check_links_config.json \ - ${{ needs.changedfiles.outputs.md }} \ - || { echo "Check that anchor links are lowercase"; exit 1; } + ${{ steps.changed-files.outputs.all_changed_files }} \ + || { echo "Check that anchor links are lowercase"; exit 1; } \ No newline at end of file From aa41a16f6b47d29f6c77b018b162857df23686de Mon Sep 17 00:00:00 2001 From: Manvi <155549774+Manvi2402@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:38:32 +0530 Subject: [PATCH 3/4] update CHANGELOG for #4978 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9130b344751..89a4d410c92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#4935](https://github.com/open-telemetry/opentelemetry-python/pull/4935)) - `opentelemetry-sdk`: upgrade vendored OTel configuration schema from v1.0.0-rc.3 to v1.0.0 ([#4965](https://github.com/open-telemetry/opentelemetry-python/pull/4965)) - +- improve check-links ci job + ([#4978](https://github.com/open-telemetry/opentelemetry-python/pull/4978)) ## Version 1.40.0/0.61b0 (2026-03-04) - `opentelemetry-sdk`: deprecate `LoggingHandler` in favor of `opentelemetry-instrumentation-logging`, see `opentelemetry-instrumentation-logging` documentation From 1d42f8138a9bdfcf907415960892c8a092e77c0a Mon Sep 17 00:00:00 2001 From: manvi Date: Sat, 14 Mar 2026 12:39:01 +0530 Subject: [PATCH 4/4] ci: address review comments --- .github/workflows/check-links.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index b9e968e2d8b..b783f25d110 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -2,6 +2,10 @@ name: check-links on: push: branches: [ main ] + paths: + - '**/*.md' + - '.github/workflows/check-links.yml' + - '.github/workflows/check_links_config.json' pull_request: paths: - '**/*.md' @@ -23,8 +27,6 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v6 - with: - fetch-depth: 0 - name: Get changed markdown files id: changed-files