Improve robustness of dead link checker by looking more closely at potential redirects#2701
Conversation
b9016e8 to
807f80b
Compare
| <div class="width-6-12 width-12-12-m"> | ||
| <ul> | ||
| <li><a href="{{site.baseurl}}/guides/spring-tx">Spring Transactions</a> — <code>@Transactional</code></li> | ||
| <li><a href="{{site.baseurl}}/version/main/guides/spring-tx">Spring Transactions</a> — <code>@Transactional</code></li> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
807f80b to
d65028c
Compare
|
🙈 The PR is closed and the preview is expired. |
ae8263c to
e239656
Compare
…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>
e239656 to
d303b97
Compare
|
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. |
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).