Skip to content

Add workflow to catch broken URLs in the docs#356

Open
jatkinson1000 wants to merge 7 commits intomainfrom
website_typos
Open

Add workflow to catch broken URLs in the docs#356
jatkinson1000 wants to merge 7 commits intomainfrom
website_typos

Conversation

@jatkinson1000
Copy link
Copy Markdown
Member

Spotted by @niccolozanotti and patched here.

I also did a quick scan for anything else that may be outdated.

@jatkinson1000
Copy link
Copy Markdown
Member Author

Tried:

Will leave for now as non-urgent and taken a fair amount of time today.

@jatkinson1000 jatkinson1000 force-pushed the website_typos branch 2 times, most recently from c4c1011 to 42622b0 Compare April 11, 2025 15:01
@jatkinson1000 jatkinson1000 changed the title Fix broken link to repo and add missing link in web docs. Add workflow to catch broken URLs in the docs Apr 11, 2025
@jatkinson1000 jatkinson1000 force-pushed the website_typos branch 2 times, most recently from 90d3802 to f7a113a Compare April 11, 2025 18:58
@jatkinson1000
Copy link
Copy Markdown
Member Author

Made my own 🙄

Works fine on my machine, but fails on GitHub CI for the gcc links.
Returns 000 exit code for curl.

Is Gnu blocking requests from GitHub servers?? 🤣

This was supposed to be simple 😭

@jatkinson1000
Copy link
Copy Markdown
Member Author

Huh, updated but passed fine that time 🤷

@jatkinson1000
Copy link
Copy Markdown
Member Author

TODO:

  • Add some docs
  • Rename to checkmdlinks.sh

@jatkinson1000 jatkinson1000 added the RAB Issues and PRs associated with RAB label Jan 5, 2026
@jatkinson1000 jatkinson1000 added this to the v1.1 milestone Jan 5, 2026
@joewallwork joewallwork linked an issue Feb 2, 2026 that may be closed by this pull request
@jatkinson1000
Copy link
Copy Markdown
Member Author

@Mikolaj-A-Kowalski any thoughts appreciated here.

This seems rather fickle (rate limiting and bots/redirects to be checked manually) to run as part of CI.
I'm wondering if we just add it as a script and rely on developers to run instead as a useful utility - see #574.

Further, there are some links to TorchScript documentation that it seems PyTorch has simply deleted from the latest version.

@Mikolaj-A-Kowalski
Copy link
Copy Markdown
Member

I would not be inclined to scrap the automated check completely (as in do we really trust ourselves to run the script as often as we should ;-) ), but I completely agree that it is far to brittle to be blocking for the CI.

What I am thinking is we could add continiue-on-error to the link check step so it doesn't kill the job.

Also to make the results more visible we can raise a 'notice' using the appropriate workflow command, i.e. for the failure echo something like that:

echo "::notice title=Maybe broken link:: '$url' may not be reachable got  (HTTP $status_code). Note this check is brittle. Please check manually and ignore this message if the link seems OK."

This should create a helpful (?) banner. Not entirely sure where though if the file and line is not explicitly specified...

May also be a better idea to collect all failing links into a single message to avoid getting multiple banners.

My thinking is that we can keep the check running for some time and we will get a sense of how annoying vs useful it will be. If it creates too much noise we can always scrap it.

Copy link
Copy Markdown
Collaborator

@joewallwork joewallwork left a comment

Choose a reason for hiding this comment

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

This version of the script mostly works well for me, although I get the rate limit errors mentioned.

I'm wondering if we just add it as a script and rely on developers to run instead as a useful utility

How about we add it as a CI job whose only trigger is calendar-based? e.g., runs early AM on the first day of the month?

Comment on lines +68 to +69
chmod +x checklinks.sh
./checklinks.sh
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it bad practice to ship scripts that are already executable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hackathon RAB Issues and PRs associated with RAB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI task to check for broken links in the docs

3 participants