-
Notifications
You must be signed in to change notification settings - Fork 16
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
Find a way to deal with 429 Too Many Requests #53
Comments
This is a hard thing to fix in a general way because different rate limits (if they have any at all). |
I wonder if #63 mitigates the problem. |
I tested this out by running
Right, this is why I think |
Continuous deployments work correctly as long as the pipeline passes. Unfortunately, the pipeline is not currently passing, and fixing it is not trivial. Here are the current errors, taken from https://gitlab.com/jyn514/YDBDoc/-/jobs/791375698 and https://gitlab.com/jyn514/YDBDoc/-/jobs/793823039: ``` Found invalid urls in /builds/jyn514/YDBDoc/target/AcculturationGuide/acculturation.html: Error fetching http://worldvista.org/AboutVistA: http://worldvista.org/AboutVistA: timed out Unexpected HTTP status fetching YottaDB/YDB#109: 429 Too Many Requests Unexpected HTTP status fetching YottaDB/YDB#161: 429 Too Many Requests Unexpected HTTP status fetching YottaDB/YDB#186: 429 Too Many Requests Unexpected HTTP status fetching YottaDB/YDB#188: 429 Too Many Requests Unexpected HTTP status fetching YottaDB/YDB#145: 429 Too Many Requests ``` Note that all these URLs exist, the only problem is that the pipeline is rate-limited or the request times out. There are a few possible solutions: - Don't check HTTP pages at all. This will catch fewer failures, but not have any spurious failures at all. - Retry pages that fail. This will require upstream support in cargo-deadlinks (deadlinks/cargo-deadlinks#53). It will not help with rate-limits (since the retries will also count against the limit). - Ignore failures in some websites. This requires upstream support (deadlinks/cargo-deadlinks#57). It will help with both issues. - Add a GitHub token in the environment to increase the rate limit. This will not fix the issues with timeouts, but should fix the vast majority of other errors. Unfortunately, it also requires storing secrets in pipelines and having a dedicated GitHub account for this. GitLab has support for storing secret credentials, so this is feasible. - Change some of the URLs to point to GitLab. This will help with the GitHub rate limits but not with the VistA timeout. - Remove some URLs from the documentation. This is not a _good_ solution, but it is _a_ solution. The change implemented here is to not check HTTP pages at all. If in the future deadlinks has more support for retries, the check could be re-enabled.
When validating a lot of URLs with
--check-http
, it's common to get '429 Too Many Requests'. It would be great to be able to ignore these. Alternatively, maybecargo-deadlinks
could add a rate-limit option that avoids getting the error in the first place.The text was updated successfully, but these errors were encountered: