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

Fix filtering of verify and should fix #1488 #1690

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/bandersnatch/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from .filter import LoadedFilters
from .master import Master
from .package import Package
from .storage import storage_backend_plugins
from .utils import convert_url_to_path, find_all_files, hash, unlink_parent_dir

Expand Down Expand Up @@ -155,12 +156,15 @@
return

# apply releases filter plugins like class Package
for plugin in LoadedFilters().filter_release_plugins() or []:
plugin.filter(pkg)
pkg_c = Package(pkg["info"]["name"])
pkg_c._metadata = pkg
pkg = pkg_c
pkg.filter_all_releases_files(LoadedFilters().filter_release_file_plugins())
pkg.filter_all_releases(LoadedFilters().filter_release_plugins())

Check warning on line 163 in src/bandersnatch/verify.py

View check run for this annotation

Codecov / codecov/patch

src/bandersnatch/verify.py#L159-L163

Added lines #L159 - L163 were not covered by tests

deferred_exception = None
for release_version in pkg[releases_key]:
for jpkg in pkg[releases_key][release_version]:
for release_version in pkg.releases:
for jpkg in pkg.releases[release_version]:
pkg_file = mirror_base_path / "web" / convert_url_to_path(jpkg["url"])
if not pkg_file.exists():
if args.dry_run:
Expand Down
Loading