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

make "link check" more specific to GitHub? #45

Closed
maelle opened this issue Oct 11, 2024 · 3 comments
Closed

make "link check" more specific to GitHub? #45

maelle opened this issue Oct 11, 2024 · 3 comments

Comments

@maelle
Copy link
Member

maelle commented Oct 11, 2024

why not send a call to the users REST endpoint and see whether a 404 is returned?

@mpadge mpadge closed this as completed in cc62409 Oct 11, 2024
@mpadge
Copy link
Member

mpadge commented Oct 11, 2024

That is what is done, although just to main page:
https://github.com/ropenscilabs/allcontributors/blob/cc624093840810f2ab6d68a0173c6cfd7722187e/R/urlcheck.R#L13

doesn't make any difference though. The problem was that code was only accepting status = 429, but the whole thing runs in a curl pool request
https://github.com/ropenscilabs/allcontributors/blob/cc624093840810f2ab6d68a0173c6cfd7722187e/R/urlcheck.R#L63
and that often returns 429. Above commit just replaced out == 200 with out != 404. Thanks again

@maelle
Copy link
Member Author

maelle commented Oct 14, 2024

@mpadge why not use gh for that call so that not too many requests are sent at once then?

@mpadge
Copy link
Member

mpadge commented Oct 14, 2024

Because I did try that back at the time, and using a curl pool was literally thousands of times faster. The check_url = TRUE option via gh becomes so slow that it's unusable. I think the good aspect there is that, at least in my test from your igraph example, the 400's were caught. 429's don't matter as long as they don't mask 400's, which I'm happy to presume for now is indeed the case.

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

2 participants