From b574a5bff4d34f48f9a2e9b6c2791e02a7fa7d84 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 24 Aug 2025 09:35:51 -0700 Subject: [PATCH 1/4] Fix link check failures --- .github/scripts/lychee-config.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/scripts/lychee-config.toml b/.github/scripts/lychee-config.toml index d368a2404..32647b5d1 100644 --- a/.github/scripts/lychee-config.toml +++ b/.github/scripts/lychee-config.toml @@ -6,11 +6,11 @@ max_concurrency = 4 # Check link anchors include_fragments = true -# excluding links to pull requests and issues is done for performance -# sonatype snapshots are currrently unbrowseable exclude = [ + # excluding links to pull requests and issues is done for performance "^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\d+$", - '^https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/opentelemetry/contrib/$', + # groovy-lang.org links are timing out when accessed via lychee + "^http://(docs.|)groovy-lang.org", + # mvnrepository.com links are returning 403 when accessed via lychee + "^https://mvnrepository.com", ] - - From 4c9e97d1cefbabbdb1761626def693021ed04b65 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 24 Aug 2025 09:43:43 -0700 Subject: [PATCH 2/4] workflow --- .github/workflows/reusable-link-check.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index da70758ff..468ca80cc 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -32,6 +32,19 @@ jobs: echo "files=$modified_files" >> $GITHUB_OUTPUT echo "Modified files: $modified_files" + - name: Check if lychee config was modified + if: github.event_name == 'pull_request' + id: config-check + run: | + merge_base=$(git merge-base origin/${{ github.base_ref }} HEAD) + config_modified=$(git diff --name-only $merge_base...${{ github.event.pull_request.head.sha }} \ + | grep -E '\.github/scripts/lychee-config\.toml$' || true) + if [ -n "$config_modified" ]; then + echo "modified=true" >> $GITHUB_OUTPUT + else + echo "modified=false" >> $GITHUB_OUTPUT + fi + - name: Link check - all links (modified files only) if: github.event_name == 'pull_request' && steps.modified-files.outputs.files != '' env: @@ -39,7 +52,7 @@ jobs: run: ./.github/scripts/link-check.sh ${{ steps.modified-files.outputs.files }} - name: Link check - all links (all files) - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' || steps.config-check.outputs.modified == 'true' env: GITHUB_TOKEN: ${{ github.token }} run: ./.github/scripts/link-check.sh From 7206493d7fc3a52f854ab49b640792ade38e57b4 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 25 Aug 2025 09:46:59 -0700 Subject: [PATCH 3/4] Also rerun on lychee updates --- .github/workflows/reusable-link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index 468ca80cc..dea394625 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -38,7 +38,7 @@ jobs: run: | merge_base=$(git merge-base origin/${{ github.base_ref }} HEAD) config_modified=$(git diff --name-only $merge_base...${{ github.event.pull_request.head.sha }} \ - | grep -E '\.github/scripts/lychee-config\.toml$' || true) + | grep -E '\.github/scripts/(lychee-config\.toml|link-check\.sh|dependencies\.Dockerfile)$' || true) if [ -n "$config_modified" ]; then echo "modified=true" >> $GITHUB_OUTPUT else From 3fcd9670ac5bfe33c135e901bb236a7d793b62bf Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 26 Aug 2025 07:58:13 -0700 Subject: [PATCH 4/4] Update .github/scripts/lychee-config.toml --- .github/scripts/lychee-config.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/scripts/lychee-config.toml b/.github/scripts/lychee-config.toml index 32647b5d1..b2d5285f1 100644 --- a/.github/scripts/lychee-config.toml +++ b/.github/scripts/lychee-config.toml @@ -9,8 +9,4 @@ include_fragments = true exclude = [ # excluding links to pull requests and issues is done for performance "^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\d+$", - # groovy-lang.org links are timing out when accessed via lychee - "^http://(docs.|)groovy-lang.org", - # mvnrepository.com links are returning 403 when accessed via lychee - "^https://mvnrepository.com", ]