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

Downloads: Enforce constraint that only one ReleaseFile per OS per Release has "Download button" enabled. #2137

Merged
merged 3 commits into from Sep 9, 2022

Conversation

ewdurbin
Copy link
Member

@ewdurbin ewdurbin commented Sep 7, 2022

Our most favorite (and common) release failure!

This enforces the constraint on the DB level and raises a ValidationError if attempting to make a change that would breach it.

Before, RMs might accidentally mark multiple ReleaseFile objects as the "Download" for a given OS on a Release. This breaks the rendering of the downloads page for that release (and the main downloads page if it's the current release!) due to the Django "get" query here.

ewdurbin added 3 commits Sep 7, 2022
…ton value

This is by far the most common breakage during CPython releases... stop it from being possible
@ewdurbin
Copy link
Member Author

ewdurbin commented Sep 7, 2022

Please take a look @python/python-release-managers

@ewdurbin
Copy link
Member Author

ewdurbin commented Sep 7, 2022

@ned-deily
Copy link
Member

ned-deily commented Sep 8, 2022

I took a look at it and, while I'm not prepared to try to test it ahead of time, it looks good to me in principle. I'd recommend that you deploy it soon and let us know so we can test it live and then make any adjustments prior to the next set of releases. Thanks for tackling this, @ewdurbin! We've stumbled across this once too often.

@ewdurbin ewdurbin merged commit d6cb282 into main Sep 9, 2022
2 checks passed
@ewdurbin ewdurbin deleted the constrain_download_button_option branch Sep 9, 2022
@ewdurbin
Copy link
Member Author

ewdurbin commented Sep 15, 2022

This constraint is now live @python/release-managers-in-development-maintenance-and-security-mode please check your tooling. In particular it appears that the recent Windows release for Python 3.11.0rc2 had both the 64bit and ARM installers marked as downloadable.

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

Successfully merging this pull request may close these issues.

None yet

2 participants