Repository navigation
Log upstream refusals of metadata fetches as warnings - #725
Open
ThomasSteinbach wants to merge 1 commit into
Open
ThomasSteinbach wants to merge 1 commit into
ThomasSteinbach wants to merge 1 commit into
Conversation
A definite 4xx from upstream (other than 404, 408 and 429) still answers 502, but it is upstream's answer rather than a fault in the proxy, so logging it at error level makes routine refusals look like outages. The case that prompted this: install scripts that probe an object store for a key that may not exist get a 403 from S3, and every probe logged an error. The status now travels as upstreamStatusError, with the same message as before.
Contributor
|
Thanks, this fixes a real nuisance, and putting it in Two things to consider:
A test through a handler, for example the generic one with an upstream answering 403, would pin the case from the description. The current test calls the internal functions directly. |
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.
When upstream answers a metadata fetch with a definite 4xx (other than 404), the proxy still returns 502, which is right per #503's discussion, but it logs every one at error level. With install scripts that probe an object store for keys that may not exist, S3 answers 403 and each probe shows up as an error, so real outages get buried.
This logs those refusals as warnings and keeps 408/429 and 5xx at error. Status codes and the stale fallback don't change.
(Disclaimer: Got support from my buddy Opus 5.5)
Summary by CodeRabbit