-
Notifications
You must be signed in to change notification settings - Fork 141
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
Packages are not automatically deleted + delete CLI bugs #1273
Comments
Bandersnatch does not support delete during the We only have Without adding more metadata to PyPI we can't make this more efficient. |
@cooperlees thanks cooper, problem is that may someday risk packages may appear online.After official delete it , I'd like to stay consistent. |
This is not an easy fix. As I said, ideally we'd need to put more metadata into Warehouse (pypi.org). If you have cycles, opening an issue on warehouse (if we don't have one) asking for better metadata to allow mirroring to delete packages would be a good start.
bandersnatch will correctly generate correct Simple API HTML + JSON, so the package manager (e.g. pip) won't know the deleted/yanked version exists. The artifacts/blobs are just sitting there wasting disk space. A verify running in the background could slowly reclaim space. Walking filesystems is slow tho, I get that :( |
Thanks to you @cooperlees ,It's not only the disk space's issue , It'seems that once in a while the official will delete some risk packages just like "rest-framework" and "apicolors" as I said.We also don't want them can still be downloaded. |
https://bandersnatch.readthedocs.io/en/latest/#bandersnatch-verify Yes, running a
I would love to know how you imagine doing this via shell? It should be no easier than just enhancing bandersnatch's logic. |
Maybe obtain a official package list and compare it to local list ? If one package is not exist ,delete it locally? |
just as a infomation-sync, this situation happens again as below: https://pypi.org/project/torchtriton/ has already deleted torchtriton,but it just did't not delete it automaticlly while using bandersnatch. |
@cooperlees hello cooperlees,
Question is that when I plan to delete them manually , I just can't make it done,take project "aaaaaaaaaaa" for example :
could you help me explain why does it happens? |
So I don't have any plans to work on this. To do this correctly we need to store packages differently, change PyPI metadata or add another API to PyPI to let us know what to delete. In the logs I see If that's not the issue, then it's the fact the the package is deleted, and so it the JSON metadata, so we need to use local metadata only. If that's somehow been deleted too we're out of luck and need to manually delete.
Fix PR with unittest covering bug/new behavior welcome! |
Maybe the delete CLI needs a --no-json-update to try not to pull from pypi.orgyes it is indeed. |
Should just need a boolean around the code that calls pipit.org to pull the JSON in verify.py - I haven't read the code tho, and I have a terrible memory :) |
Could you tell me how to remove official removed packages automatically?
for example : https://pypi.org/project/apicolors/
the apicolors are deleted by pypi.org 4 days ago(Nov 9), but after my bandersnatch server synced it locally,It exist till now (Nov 11).(but my sync interval is 30min)
here is the bander.log:
And here is the bandersnatch.conf and I'am using bandersnatch-6.0.0 on docker-compose.
The text was updated successfully, but these errors were encountered: