Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: 202 is Accepted for a non-dead link. #1274

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scbjans
Copy link
Contributor

@scbjans scbjans commented Nov 29, 2024

The Markdown Link Check job occasionally checks a link on rubydoc.info which needs to be rendered. In that case a HTTP 202 is returned.
However that leads to an error, e.g. here:

ERROR: 1 dead links found!
[✖] https://www.rubydoc.info/gems/opentelemetry-propagator-ottrace → Status: 202

A HTTP 202 should be Accepted.

@arielvalentin
Copy link
Collaborator

Any idea why the action is failing?

@xuan-cao-swi
Copy link
Contributor

ERROR: 1 dead links found!
[✖] https://opensource.org/licenses/MIT → Status: 403

I curl the link returns HTTP/2 301. I guess the ci/action exceed the rate limit for the opensource.org?

@scbjans
Copy link
Contributor Author

scbjans commented Nov 29, 2024

ERROR: 1 dead links found!
[✖] https://opensource.org/licenses/MIT → Status: 403

I curl the link returns HTTP/2 301. I guess the ci/action exceed the rate limit for the opensource.org?

I would expect a 429 in that case..? Anyway, I see the author of the action recommends switching to Linkspector. So maybe we should close this PR and put some effort into migrating to Linkspector?

@arielvalentin
Copy link
Collaborator

Probably.

Another thing we may want to try is only run the action if it detects changes to markdown files.

@scbjans
Copy link
Contributor Author

scbjans commented Dec 2, 2024

I'd expect the markdownlink check action doesn't send a Host header triggering some kind of ddos protection?

curl -I -H 'Host:' --http1.0 https://opensource.org/licenses/MIT
HTTP/1.1 403 Forbidden

Probably.

Another thing we may want to try is only run the action if it detects changes to markdown files.

Running this action only on modified files will not catch links in other files going dead over time.
Maybe this action shouldn't run on.pull_request but on.schedule?

If time permits I'll look into Linkinspector end of this week, or beginning of next week.

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