Skip to content

Enable fetch cooldown in more cases#33781

Closed
blue42u wants to merge 3 commits intospack:developfrom
blue42u:less-cache-fetch-error
Closed

Enable fetch cooldown in more cases#33781
blue42u wants to merge 3 commits intospack:developfrom
blue42u:less-cache-fetch-error

Conversation

@blue42u
Copy link
Copy Markdown
Contributor

@blue42u blue42u commented Nov 9, 2022

...And hopefully reduce the number of FetchCacheErrors that bubble up.

My previous PRs (#32137 and #33509) added a cooldown between attempts to fetch a buildcache's index.json, but only when the mirror had already been fetched once. The first of these two patches extends this to also include "new" mirrors that did not load an index into the cache, either due to failures or because there is no index.json. (Note that this does not include mirrors that were deleted and re-added, the _last_fetch_times entry is deleted in that case.)

The second patch adjusts the usage in find_by_hash to avoid throwing a FetchCacheError if the update fails. This function previously didn't throw exceptions, so keeping this from propagating reduces surprises in other locations.

@spackbot-app spackbot-app bot added binary-packages core PR affects Spack core functionality labels Nov 9, 2022
@blue42u
Copy link
Copy Markdown
Contributor Author

blue42u commented Nov 9, 2022

@scottwittenburg Can you check if this fixes your cache fetch issue?

@scottwittenburg
Copy link
Copy Markdown
Contributor

Can you check if this fixes your cache fetch issue?

Yes, thanks, it does. With this change, each configured mirror that doesn't have an index seems to be checked just once.

@blue42u
Copy link
Copy Markdown
Contributor Author

blue42u commented Dec 20, 2022

Closing in favor of #34360

@blue42u blue42u closed this Dec 20, 2022
@blue42u blue42u deleted the less-cache-fetch-error branch December 20, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binary-packages core PR affects Spack core functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants