Reduce ERROR log spam for expected NoSuchKey responses - #9965
Reduce ERROR log spam for expected NoSuchKey responses#9965VershaAgrawal wants to merge 1 commit into
Conversation
Signed-off-by: VershaAgrawal <vershaagrawal98@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change reduces log detail for expected missing-object errors. S3 GET and HEAD ChangesExpected missing-object logging
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change reduces noisy error logging for expected missing-object responses while preserving response behavior and error logging for other failures; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| err.stack || err, | ||
| err.context ? `- context: ${err.context?.trim()}` : '', | ||
| ); | ||
| if (s3err.code === 'NoSuchKey' && (req.method === 'GET' || req.method === 'HEAD')) { |
There was a problem hiding this comment.
Do we need to include NO_SUCH_OBJECT also?
| err.context ? `- context: ${err.context?.trim()}` : '', | ||
| ); | ||
| if (s3err.code === 'NoSuchKey' && (req.method === 'GET' || req.method === 'HEAD')) { | ||
| dbg.log1('S3 NoSuchKey', req.method, req.originalUrl, req.request_id); |
There was a problem hiding this comment.
can we add JSON.stringify(req.headers) too?
Describe the Problem
Expected missing-object lookups (e.g. Thanos marker GETs) were treated like failures. Every NoSuchKey / NO_SUCH_OBJECT was logged at ERROR with a full stack.
Explain the Changes
Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
Summary by CodeRabbit