Skip to content

CI: add link validation#2820

Merged
ArthurSens merged 2 commits intoprometheus:mainfrom
kairveeehh:main
Feb 6, 2026
Merged

CI: add link validation#2820
ArthurSens merged 2 commits intoprometheus:mainfrom
kairveeehh:main

Conversation

@kairveeehh
Copy link
Contributor

@kairveeehh kairveeehh commented Jan 29, 2026

solves #2794
@ArthurSens , it checks and lets you have an artifact after it runs , scheduled weekly and I have tested manually as well.
There are certain cases where you might want to ignore the fact that the link is broken but those are very specific to be added inside the rules for the CI , kindly review and let me know if anything is to be modified.

@kairveeehh
Copy link
Contributor Author

@ArthurSens kindly review it.

Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

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

Hi, thanks a lot!
I have two requests:

  1. Can you add a Makefile target that runs mdox and change the action to use that new target?
  2. I don't think we need to report uploaded anywhere. It would be better to fail the run when broken links are detected. We can then run the check locally and deal with broken links in a PR.

Signed-off-by: kairvee <145572028+kairveeehh@users.noreply.github.com>
@kairveeehh
Copy link
Contributor Author

hii @ArthurSens , @jan--f I have made the changes as requested and tested the CI manually on my forked repo too , it fails as expected.
kindly review.

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Apologies for the delayed review here! I was traveling during the last week and couldn't keep up with GitHub notifications.

Just two comments, and it's good to merge in my opinion!

I can see some improvement opportunities, but let's tackle them in follow-up PRs and issues:

  • The Makefile assumes whoever runs this has mdox installed. We can use some cool tricks to download mdox for the user automatically if it's not there
  • Some links don't work locally, but work on the website... these warnings could be ignored.

Comment on lines 4 to 5
schedule:
- cron: '0 6 * * 1' # Mondays at 06:00 UTC
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
schedule:
- cron: '0 6 * * 1' # Mondays at 06:00 UTC

As Jan mentioned, maybe let's remove the schedule since we don't know how often we can keep up with notifications. If we use manual triggers, at least we can control when we want to see the reports.

Comment on lines 1 to 3
.PHONY: mdox-check

mdox-check:
@mdox fmt --links.validate --check $$(find . -type d -name node_modules -prune -o -type d -name .next -prune -o -type d -name .git -prune -o -name '*.md' -print)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.PHONY: mdox-check
mdox-check:
@mdox fmt --links.validate --check $$(find . -type d -name node_modules -prune -o -type d -name .next -prune -o -type d -name .git -prune -o -name '*.md' -print)
.PHONY: mdox-check
mdox-check:
@mdox fmt --links.validate --check $$(find . -type d -name node_modules -prune -o -type d -name .next -prune -o -type d -name .git -prune -o -name '*.md' -print)

This empty line isn't needed

@@ -0,0 +1,25 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

Could we remove this script? I'm not sure removing broken links is the way we wanna fix everything. I suspect we'll need to manually review everything and decide on a case-by-case approach, whether we want to remove or replace the link

@kairveeehh
Copy link
Contributor Author

kairveeehh commented Feb 6, 2026

Apologies for the delayed review here! I was traveling during the last week and couldn't keep up with GitHub notifications.

Just two comments, and it's good to merge in my opinion!

I can see some improvement opportunities, but let's tackle them in follow-up PRs and issues:

  • The Makefile assumes whoever runs this has mdox installed. We can use some cool tricks to download mdox for the user automatically if it's not there
  • Some links don't work locally, but work on the website... these warnings could be ignored.

No problem , it is completely ok :)
Sure, will work further over these improvements.

did the suggested changes as well, can be reviewed for the same.

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Thanks!

@ArthurSens ArthurSens merged commit c823cbd into prometheus:main Feb 6, 2026
5 checks passed
This was referenced Feb 6, 2026
@ArthurSens
Copy link
Member

I've created #2828 to discuss next steps

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.

3 participants