Closed jax79sg closed 3 years ago
verify
does not respect plugins at all. It never has. Only mirror
. Would accept a PR that fixes that. Maybe this need to be clearer in the documentation until we do integrate support (if we ever do).
The key error is a bug that definitely needs to be fixed. Thanks for reporting.
Hi @cooperlees , thank you for the reply. Due to my poor internet connection, I get disconnections often and thus result in incomplete mirror. Other than verify
, what can I do to download the missing delta?
bandersnatch sync
might help you to fix a specific package.
cooper-mbp1:bandersnatch cooper$ /tmp/bla_venv/bin/bandersnatch sync --help
usage: bandersnatch sync [-h] package [package ...]
positional arguments:
package The name of package to sync
This error may have been fixed with some plugin work. If not, please re-open.
The error still exists.. I am using a few plugin and when using verify command I see
Traceback (most recent call last):
File "/opt/repos/PyPI/bandersnatch/bin/bandersnatch", line 8, in
[plugins] enabled = exclude_platform latest_release blocklist_project blocklist_release allowlist_project allowlist_release project_requirements project_requirements_pinned
Version: Bandersnatch docker image (pulled at time of this message ). Issues: When performing verify
whitelist_project
plugin. E.g. Non whitelisted items were downloaded as welllatest_release
plugin with error for some packages.Here is my bandersnatch.conf for reference
; Save JSON metadata into the web tree: ; URL/pypi/PKG_NAME/json (Symlink) -> URL/json/PKG_NAME json = true
; Cleanup legacy non PEP 503 normalized named simple directories cleanup = false
; The PyPI server which will be mirrored. ; master = https://test.python.org ; scheme for PyPI server MUST be https master = https://pypi.org
; The network socket timeout to use for all connections. This is set to a ; somewhat aggressively low value: rather fail quickly temporarily and re-run ; the client soon instead of having a process hang infinitely and have TCP not ; catching up for ages. timeout = 60000
; Number of worker threads to use for parallel downloads. ; Recommendations for worker thread setting: ; - leave the default of 3 to avoid overloading the pypi master ; - official servers located in data centers could run 10 workers ; - anything beyond 10 is probably unreasonable and avoided by bandersnatch workers = 3
; Whether to hash package indexes ; Note that package index directory hashing is incompatible with pip, and so ; this should only be used in an environment where it is behind an application ; that can translate URIs to filesystem locations. For example, with the ; following Apache RewriteRule: ; RewriteRule ^([^/])([^/])/$ /mirror/pypi/web/simple/$1/$1$2/ ; RewriteRule ^([^/])([^/])/([^/]+)$/ /mirror/pypi/web/simple/$1/$1$2/$3 ; OR ; following nginx rewrite rules: ; rewrite ^/simple/([^/])([^/])/$ /simple/$1/$1$2/ last; ; rewrite ^/simple/([^/])([^/])/([^/]+)$/ /simple/$1/$1$2/$3 last; ; Setting this to true would put the package 'abc' index in simple/a/abc. ; Recommended setting: the default of false for full pip/pypi compatibility. hash-index = false
; Whether to stop a sync quickly after an error is found or whether to continue ; syncing but not marking the sync as successful. Value should be "true" or ; "false". stop-on-error = false
; Advanced logging configuration. Uncomment and set to the location of a ; python logging format logging config file. ; log-config = /etc/bandersnatch-log.conf
; Generate index pages with absolute urls rather than relative links. This is ; generally not necessary, but was added for the official internal PyPI mirror, ; which requires serving packages from https://files.pythonhosted.org ; root_uri = https://example.com
; Number of consumers which verify metadata verifiers = 3
; Number of prior simple index.html to store. Used as a safeguard against ; upstream changes generating blank index.html files. Prior versions are ; stored under as "versions/index.html" and the current
; index.html will be a symlink to the latest version.
; If set to 0 no prior versions are stored and index.html is the latest version.
; If unset defaults to 0.
; keep_index_versions = 0
; vim: set ft=cfg:
; Configure a file to write out the list of files downloaded during the mirror. ; This is useful for situations when mirroring to offline systems where a process ; is required to only sync new files to the upstream mirror. ; The file be be named as set in the diff-file, and overwritten unless the ; diff-append-epoch setting is set to true. If this is true, the epoch date will ; be appended to the filename (i.e. /path/to/diff-1568129735) ; diff-file = /srv/pypi/mirrored-files ; diff-append-epoch = true
[plugins] enabled = exclude_platform whitelist_project latest_release
[blacklist] platforms = windows macos freebsd
[whitelist] packages = urllib3 ....truncated [latest_release] keep = 80