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

feat(admin): Project Quarantine #16179

Merged
merged 8 commits into from
Jul 8, 2024

Conversation

miketheman
Copy link
Member

@miketheman miketheman commented Jun 27, 2024

This set of changes introduces a concept of Project Lifecycle Status, and specifically adding and removing projects from a quarantine status.

There are no end-user facing changes yet, and those will only be introduced after this PR is merged/deployed (so there's no race condition with ORM changes and columns not existing in time...)

The intent is to have a status that can convey that we are not certain if a project is good or bad yet - but it's concerning enough that we want to make in unavailable to installers or mirrors. Those changes will follow later.

This is mostly to get a feel for how it will work on the Project's model and how things enter and exit quarantine.

@miketheman miketheman added HTML requires change to HTML files admin Features needed for the Admin UI (people running the site) malware-detection Issues related to automated malware detection. labels Jun 27, 2024
@miketheman miketheman marked this pull request as ready for review June 27, 2024 17:59
@miketheman miketheman requested a review from a team as a code owner June 27, 2024 17:59
@miketheman miketheman force-pushed the miketheman/quarantine-project branch from 38055e2 to b7ead57 Compare June 27, 2024 18:16
@miketheman miketheman force-pushed the miketheman/quarantine-project branch 3 times, most recently from 4ab2b82 to acdd6bf Compare July 1, 2024 19:32
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
The migration ran in production in April.
Using ORM objects in migrations is apparently dangerous for tests, since
we run the entire migration stack from scratch, and **later** modifications
to a model are not available at the point this migration is being executed.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
A button that re-uses the malware routes.
We can create bespoke routes and views for quarantine manipulation if we
find that using this feature leads to confusing redirects, but for now
I'm opting for simpler implementation.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman force-pushed the miketheman/quarantine-project branch from c607f4a to 5919087 Compare July 2, 2024 15:00
@miketheman miketheman merged commit 66b6730 into pypi:main Jul 8, 2024
17 checks passed
@miketheman miketheman deleted the miketheman/quarantine-project branch July 8, 2024 19:22
miketheman added a commit to miketheman/warehouse that referenced this pull request Jul 8, 2024
4 seconds wasn't long enough to get the lock on `projects`.

Refs: pypi#16179

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Features needed for the Admin UI (people running the site) HTML requires change to HTML files malware-detection Issues related to automated malware detection.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants