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

invalid_url check seems to fail with 403 #354

Open
lorepirri opened this issue Aug 13, 2024 · 0 comments
Open

invalid_url check seems to fail with 403 #354

lorepirri opened this issue Aug 13, 2024 · 0 comments

Comments

@lorepirri
Copy link

The linter recently failed to detect a redirect and is giving an error 403 unauthorized (instead of a redirect 302).

It might happen in other cases, but so far happens on redirects like https://xgboost.readthedocs.io -> https://xgboost.readthedocs.io/en/stable/.

Not much has changed recently in the check:

response = requests.head(url, allow_redirects=False, timeout=HTTP_TIMEOUT)

On a local execution, of the linter on the same feedstocks listed below, there is no 403 error.

This leads me to think that maybe Prefect might have been blacklisted. Or some other changes in the code somewhere else (cache?).

Other tests

This locally works with an error code 302:

import requests
from typing import Final

HTTP_TIMEOUT: Final[int] = 120
r = requests.head(
    "https://xgboost.readthedocs.io", allow_redirects=False, timeout=HTTP_TIMEOUT
)
print(r.status_code, r.headers["Location"])

Examples

  1. PR: lightgbm 4.5.0  AnacondaRecipes/lightgbm-feedstock#9

    clone/recipe/meta.yaml:90: invalid_url: https://lightgbm.readthedocs.io : Not reachable: 403
    
  2. PR: xgboost 2.1.1 fix AnacondaRecipes/xgboost-feedstock#20

    clone/recipe/meta.yaml:125: invalid_url: https://xgboost.readthedocs.io/ : Not reachable: 403
    
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

1 participant