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

skip HTTP 429 errors #75

Closed
pberthonneau opened this issue Oct 8, 2020 · 11 comments
Closed

skip HTTP 429 errors #75

pberthonneau opened this issue Oct 8, 2020 · 11 comments

Comments

@pberthonneau
Copy link

Hello

I had a case of ERROR: 1 dead links found! for a Status: 429: Too Many Requests.
Is there a way to ignore such intermittent error?

Thanks

@gaurav-nelson
Copy link
Owner

Thank you @pberthonneau for creating the issue. However, this issue is with the underlying markdown-link-check utility.
PS: tcort/markdown-link-check#114

I see that it's recently closed with a fix, but not yet included in the main release. Once its sorted and released I'll update the markdown-link-check version in github-action-markdown-link-check to fix this one.

@pberthonneau
Copy link
Author

Thanks. I had not dived into dependencies.


I'm not interested by retries, then I have created a mlc_config.json with "aliveStatusCodes": [200,206,429]
Hopefully it works because aliveStatusCodes is here for a long time, but who knows with 429.

@MarekLani
Copy link

MarekLani commented Nov 10, 2020

Does not work with 429 unfortunately, @gaurav-nelson please what is status on "Once its sorted and released I'll update the markdown-link-check version in github-action-markdown-link-check to fix this one." Thanks!

@jsoref
Copy link

jsoref commented Dec 27, 2020

It looks like the upstream fix was tcort/markdown-link-check@21983da which should be available in https://github.com/tcort/markdown-link-check/releases/tag/v3.8.4 and that should have been pulled in by #86.

It'd be really nice if there were documentation (in this repo) for how to use aliveStatusCodes to ignore 429.

(I'm hitting it in a project to which I'm trying to contribute, not as a maintainer, and it's a barrier to my contribution to that project.)

@gaurav-nelson
Copy link
Owner

@MarekLani @jsoref Can you please check again with github-action-markdown-link-check v1 or 1.0.12 if your issue is sorted?

  • I've updated the library to markdown-link-check version 3.8.6.

@jsoref
Copy link

jsoref commented Jan 11, 2021

@gaurav-nelson: do you happen to have a handy example for how to ignore 429s?

For reference, I hit it here: https://github.com/netdata/netdata/pull/10428/checks?check_run_id=1613144906

The netdata/netdata repository has lots of links to GitHub PRs/Issues and this action -- currently 1.0.7.

This action doesn't appear to be configured to pass the GITHUB_TOKEN along to the underlying library, so when checking links in the github space it eventually hits GitHub's usage limits. If there was enough glue (and a cursory check indicated that none of the glue exists and I suspect would be marginally painful to write) to send the GITHUB_TOKEN down to the lowest layer for use when talking to github, then I suspect there wouldn't be any 429s and thus this issue wouldn't be relevant to the repository.

I don't have energy right now to chase this (beyond spending the time to find the right PR). But I could probably provide some support if something is needed. I expect anyone forking the repository above and triggering a check would hit the problem and could skip me.

@gaurav-nelson
Copy link
Owner

Thanks @jsoref I suggest you use the updated action gaurav-nelson/github-action-markdown-link-check@v1 which supports retryOn429, retry-after, retryCount, and fallbackRetryDelay in your custom configuration file. See https://github.com/tcort/markdown-link-check#config-file-format for details.

For a handy example, you can mark 429 as alive by adding the following in your custom configuration file:

{
  "aliveStatusCodes": [429]
}

However, it won't work without gaurav-nelson/github-action-markdown-link-check@v1

@jsoref
Copy link

jsoref commented Jan 11, 2021

That doesn't do what one would hope:

[✖] https://github.com/netdata/netdata/pull/10352 → Status: 200
[✓] https://github.com/netdata/netdata/pull/10348 → Status: 429

@jsoref
Copy link

jsoref commented Jan 11, 2021

@gaurav-nelson
Copy link
Owner

@jsoref Probably include 200 in aliveStatusCodes as well "aliveStatusCodes": [429, 200]

@jsoref
Copy link

jsoref commented Jan 11, 2021

Ok, with that, the repo stops being frustrating (I was trying it before you suggested it, but it was worth noting that the advice you gave didn't work as-is).

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

No branches or pull requests

4 participants