-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(forklift): Distinguish deleted project filename error (#18671) #18925
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
Conversation
Update upload validation to check project lifecycle_status for file conflicts. Provides a more specific error message when the conflict is with an archived project. Fixes pypi#18671
|
Thanks for the PR. Note that whether or not the project is archived has no bearing on whether the given file has been deleted -- an archived project can have 'live' files and an active project can have 'deleted' files. The actual error message we're trying to improve is this one: warehouse/warehouse/forklift/legacy.py Lines 1145 to 1159 in 5f7e35c
Given that the previous checks are looking for "live" files (the So, we are already distinguishing between 'deleted' and 'live' files when returning this error message, we just need to be more clear in this error message that the file has since been 'deleted' and is no longer 'live'. |
…Delta17920/pypi_warehouse into fix-18671-deleted-project-error
|
on it |
|
Thanks for the review, @di ! I've pushed the update. I just changed the error message string in legacy.py and updated the matching test, as you suggested. |
Update upload validation to check project lifecycle_status for file conflicts. Provides a more specific error message when the conflict is with an archived project. Fixes #18671
Proof / Test Output
This ss shows the new test (

test_upload_fails_with_deleted_project_conflict) and all other tests in the file passing after the code change: