binary distribution: warn about issues (#34152)
This commit is contained in:
parent
d37dc37504
commit
ec62150ed7
@ -418,7 +418,12 @@ def update(self, with_cooldown=False):
|
|||||||
|
|
||||||
if all_methods_failed:
|
if all_methods_failed:
|
||||||
raise FetchCacheError(fetch_errors)
|
raise FetchCacheError(fetch_errors)
|
||||||
elif spec_cache_regenerate_needed:
|
if fetch_errors:
|
||||||
|
tty.warn(
|
||||||
|
"The following issues were ignored while updating the indices of binary caches",
|
||||||
|
FetchCacheError(fetch_errors),
|
||||||
|
)
|
||||||
|
if spec_cache_regenerate_needed:
|
||||||
self.regenerate_spec_cache(clear_existing=spec_cache_clear_needed)
|
self.regenerate_spec_cache(clear_existing=spec_cache_clear_needed)
|
||||||
|
|
||||||
def _fetch_and_cache_index(self, mirror_url, expect_hash=None):
|
def _fetch_and_cache_index(self, mirror_url, expect_hash=None):
|
||||||
@ -504,9 +509,9 @@ def _fetch_and_cache_index(self, mirror_url, expect_hash=None):
|
|||||||
|
|
||||||
if fetched_hash is not None and locally_computed_hash != fetched_hash:
|
if fetched_hash is not None and locally_computed_hash != fetched_hash:
|
||||||
msg = (
|
msg = (
|
||||||
"Computed hash ({0}) did not match remote ({1}), "
|
"Computed index hash [{0}] did not match remote [{1}, url:{2}] "
|
||||||
"indicating error in index transmission"
|
"indicating error in index transmission"
|
||||||
).format(locally_computed_hash, expect_hash)
|
).format(locally_computed_hash, fetched_hash, hash_fetch_url)
|
||||||
errors.append(RuntimeError(msg))
|
errors.append(RuntimeError(msg))
|
||||||
# We somehow got an index that doesn't match the remote one, maybe
|
# We somehow got an index that doesn't match the remote one, maybe
|
||||||
# the next time we try we'll be successful.
|
# the next time we try we'll be successful.
|
||||||
|
Loading…
Reference in New Issue
Block a user