Cache fallback on network failure #1161
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗣 Description
The container will alway try to see if a newer (by timestamp) distribution for the current version of FoundryVTT exists. This is because newer distributions have been published in the past without bumping the version of FoundryVTT.
This PR will allow the container to fail back to the cache when there is a network failure while trying to fetch the latest release of FoundryVTT, or check the timestamp in the r2 bucket.
Some cases where this can happen are:
FOUNDRY_RELEASE_URL
is set to an expired timed URL.FOUNDRY_USERNAME
orFOUNDRY_PASSWORD
are invalid.foundryvtt.com
is down.r2.foundryvtt.com
is down.Closes #212
Closes #1055
See:
💭 Motivation and context
It was annoying that a network failure didn't result in automatically failing back to the cache. Users had to
manually disable their credentials, or remove the timed URL.
🧪 Testing
Tested locally and in CI.
✅ Pre-approval checklist
in code comments.
to reflect the changes in this PR.