Skip to content

Improve robustness of dead link checker by looking more closely at potential redirects#2701

Merged
gsmet merged 1 commit into
quarkusio:mainfrom
holly-cummins:improve-redirect-detection
Jun 12, 2026
Merged

Improve robustness of dead link checker by looking more closely at potential redirects#2701
gsmet merged 1 commit into
quarkusio:mainfrom
holly-cummins:improve-redirect-detection

Conversation

@holly-cummins

@holly-cummins holly-cummins commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This finds some links that #2685 misses because it was too trusting when redirects were a possibility, so I've also included a temporary fix for one of our dead links.

It also fixes some false positives where redirects to the main site would have problems by ensuring we're checking redirects against the locally built site (by rewriting the url, which CI bakes in as quarkus.io).

@holly-cummins holly-cummins force-pushed the improve-redirect-detection branch from b9016e8 to 807f80b Compare June 11, 2026 10:40
Comment thread _includes/spring-migrate-content.html Outdated
<div class="width-6-12 width-12-12-m">
<ul>
<li><a href="{{site.baseurl}}/guides/spring-tx">Spring Transactions</a> &mdash; <code>@Transactional</code></li>
<li><a href="{{site.baseurl}}/version/main/guides/spring-tx">Spring Transactions</a> &mdash; <code>@Transactional</code></li>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really excited about this one. We should probably not mention it for now or we can wait for 3.37 to be released if it includes it.

But pointing to the doc from main is not ideal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better than having the dead link, right? And I think having it in the list is important, to indicate that it's coming real soon now. I mean, it doesn't matter all that much because there will be a follow-on PR in two weeks that sorts it out, but I'd like to keep it there to show what's coming.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extended this PR to also handle some bad flakiness in the tests, so I think we need to get this in, so I've just removed the problem link. I raised #2716 to put it back next week. Since it's only a week, the exact nature of the solution to the missing content doesn't matter all that much.

@holly-cummins holly-cummins marked this pull request as draft June 11, 2026 11:22
@holly-cummins holly-cummins force-pushed the improve-redirect-detection branch from 807f80b to d65028c Compare June 11, 2026 16:15
@holly-cummins holly-cummins changed the title Improve redirect detection Improve robustness of dead link checker by looking more closely at potential redirects Jun 11, 2026
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

🙈 The PR is closed and the preview is expired.

@holly-cummins holly-cummins marked this pull request as ready for review June 11, 2026 16:47
@holly-cummins holly-cummins requested a review from gsmet June 11, 2026 16:47
@holly-cummins holly-cummins force-pushed the improve-redirect-detection branch from ae8263c to e239656 Compare June 12, 2026 11:49
…tential redirects

When Playwright navigation fails or the execution context is destroyed
(typically from meta-refresh redirects), fall back to a plain HTTP probe
to distinguish real broken links from working redirects.

Only rewrite meta-refresh targets that point to quarkus.io/www.quarkus.io
back to localhost for local verification. Redirects to genuinely external
sites (e.g. quarkiverse.github.io) are accepted as valid without probing.

Also fixes the spring-tx link in spring-migrate-content.html to point to
the versioned guide path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@holly-cummins holly-cummins force-pushed the improve-redirect-detection branch from e239656 to d303b97 Compare June 12, 2026 11:50
@holly-cummins

Copy link
Copy Markdown
Contributor Author

I've also updated this to fix some egregious false negatives that were breaking most CIs (oops). The issue was that there was a race condition in handling redirects, since they end up all being pointed at quarkus.io by the CI build.

@gsmet gsmet merged commit 765f662 into quarkusio:main Jun 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants