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

Stop issuing PURGE requests on stale serial as PyPI requires authentication now #1334

Closed
ichard26 opened this issue Jan 3, 2023 · 0 comments · Fixed by #1335
Closed

Stop issuing PURGE requests on stale serial as PyPI requires authentication now #1334

ichard26 opened this issue Jan 3, 2023 · 0 comments · Fixed by #1335
Assignees
Labels
bug Something isn't working

Comments

@ichard26
Copy link
Member

ichard26 commented Jan 3, 2023

In #57, we added code to automatically issue PURGE requests to stale endpoints. This was to work around a persistent issue w/ PyPI where caches become routinely stale and unusable. This hack worked for a good while, but now PyPI requires authentication for PURGE requests, flooding the logs with useless 401 errors.

❯ curl -X PURGE -i https://pypi.org/pypi/alchemize/json
HTTP/2 401 
server: Varnish
retry-after: 0
content-type: application/json
fastly-purge-auth-failure: 1
accept-ranges: bytes
date: Tue, 03 Jan 2023 00:03:15 GMT
x-varnish: 2329315070
via: 1.1 varnish
x-served-by: cache-yyz4563-YYZ
content-length: 53

{"msg":"Provided credentials are missing or invalid"}⏎   

See also: #57 (comment)

@ichard26 ichard26 added the bug Something isn't working label Jan 3, 2023
cooperlees added a commit that referenced this issue Jan 3, 2023
- This call now 401s so there is no benefit of calling it
- Also spams logs with noise - So lets remove before more people open issues

Test:
- See tests pass
  - Remove assertion of request being sent on StalePage as we no longer do ... That is this PRs purpose

Fixes #1334
@cooperlees cooperlees self-assigned this Jan 3, 2023
cooperlees added a commit that referenced this issue Jan 3, 2023
* Remove PURGE call on StalePage

- This call now 401s so there is no benefit of calling it
- Also spams logs with noise - So lets remove before more people open issues

Test:
- See tests pass
  - Remove assertion of request being sent on StalePage as we no longer do ... That is this PRs purpose

Fixes #1334

* Update CHANGES.md

Co-authored-by: Richard Si <sichard26@gmail.com>

Co-authored-by: Richard Si <sichard26@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants