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

Option to ignore hubcaps failures #474

Closed
DanySK opened this issue Jan 23, 2022 · 12 comments
Closed

Option to ignore hubcaps failures #474

DanySK opened this issue Jan 23, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@DanySK
Copy link

DanySK commented Jan 23, 2022

Hi,
I'm using lychee to check link integrity for a whole website.
Does the tool check the same link multiple times? Despite providing a valid token, I get many:

✗ http://github.com/<foo>: Network error (hubcaps)

That I would not expect.

Is there a way to tell lychee to ignore these errors?
Something like --ignore-error=429 would be great.

Alternatively or in addition, would it be possible to wait and retry after a 429?
Something like --wait-after-cap=60 to retry links after a minute if the cap has been reached.

@mre
Copy link
Member

mre commented Jan 23, 2022

You can use

lychee --accept 200,429 ...

We should make the retry interval configurable. It's currently making three attempts and waits 1, 2, and 4 seconds respectively between each retry.
The goal is to use tower to write a service around the client in the long run and properly handle rate limiting and backoff there.

@mre
Copy link
Member

mre commented Feb 4, 2022

@DanySK did this fix your issue?

@mre mre added waiting-for-feedback bug Something isn't working labels Feb 4, 2022
@DanySK
Copy link
Author

DanySK commented Feb 4, 2022

Partly: it can skip 429 entirely, but retry count and timeout can't be set.

@mre mre added enhancement New feature or request and removed bug Something isn't working labels Feb 4, 2022
@mre
Copy link
Member

mre commented Feb 23, 2022

True, we should make those configurable. I just keep forgetting to do it. 😅

@mre
Copy link
Member

mre commented Feb 23, 2022

The retry count is already configurable through --max-retries, the timeout can be configured with --timeout and for the wait time between requests I created a pull request at #525.

@mre
Copy link
Member

mre commented Feb 24, 2022

--retry-wait-time is in master now. Let me know if that solves your problem @DanySK. 😊

@mre
Copy link
Member

mre commented Feb 24, 2022

A proper solution would be #36, with which we track the individual state of every website. This way we avoid overloading the servers and can do proper rate-limiting by parsing the respective headers and storing them in the website state.
For now, increasing the --retry-wait-time should at least help in simple cases.

DanySK added a commit to AlchemistSimulator/Alchemist that referenced this issue Feb 25, 2022
@DanySK
Copy link
Author

DanySK commented Feb 25, 2022

I'm waiting for the option to hit docker hub, as soon as it does I'll try it out

@mre
Copy link
Member

mre commented Feb 25, 2022

Hum... it should already be in.
Did you try

docker pull lycheeverse/lychee:master

I'm away from my computer so I can't verify.

@DanySK
Copy link
Author

DanySK commented Feb 28, 2022

I am using latest, which I guess points to the latest stable then?

@mre
Copy link
Member

mre commented Feb 28, 2022

Yes, latest gets updated on new releases only, not on merges to master.

@mre
Copy link
Member

mre commented Mar 2, 2022

Guess we can close this. latest should have the changes and the next release of lychee will as well. Using tower for retries is tracked in #36.

@mre mre closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants