fix(remote_file): do not fail download on cache persistence errors#25
Open
ratazzi wants to merge 1 commit into
Open
fix(remote_file): do not fail download on cache persistence errors#25ratazzi wants to merge 1 commit into
ratazzi wants to merge 1 commit into
Conversation
ETag / Last-Modified caches are a download optimization only. A failure to persist them (e.g. an unwritable state dir) previously propagated as an error and failed an already-successful download. Log a warning and continue instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
remote_filetreats a failure to persist the ETag / Last-Modified cache as a fatal error, failing a download that has already completed successfully. These caches are only an optimization for conditional requests — losing them just means the next run re-downloads.This PR downgrades cache persistence failures (e.g. an unwritable state directory) to warnings:
saveEtagerrors are caught and logged vialogger.warnsaveLastModifiederrors are caught and logged vialogger.warnTesting
zig buildpasseszig build testpasses