-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Proxito: do not serve non-existent versions #9048
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
Proxito: do not serve non-existent versions #9048
Conversation
readthedocs/proxito/views/serve.py
Outdated
# Skip serving versions that don't exist or are not active. This is to | ||
# avoid serving files that we have in the storage, but its associated | ||
# version does not exist anymore or it was de-activated | ||
if not version or not version.active: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious how this will impact our 404's. It's definitely the right approach, but something to watch on deployment.
Avoid serving files that are still in the storage (S3) for some reason but its associated version was deleted or de-activated. Closes readthedocs/readthedocs-ops#1139
305b6d3
to
7d238cf
Compare
@ericholscher please take another look at this. There were some tests failing and when I review them it seemed that I had a mistake in the logic that returns 404s. I've updated that logic to handle all the cases:
This logic does not interfere with the case:
I'm not sure if I was able to explain this here or even in the comment. Feel free to make a suggestion if you find a better way to explain this 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, but we definitely want to watch this closely. I feel like there's a non-zero chance of us accidently breaking single version projects or similar.
Co-authored-by: Eric Holscher <[email protected]>
Avoid serving files that are still in the storage (S3) for some reason but its
associated version was deleted or de-activated.
Closes https://github.com/readthedocs/readthedocs-ops/issues/1139