Log if the context expired during retry (#5229)

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2024-02-14 17:24:42 -08:00 committed by GitHub
parent f10730cf98
commit 90d6db486b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -232,7 +232,11 @@ func (mw RetryMiddleware) retryRequest(
case <-ctx.Done(): case <-ctx.Done():
// Don't retry if the context is marked as done, it will just error out // Don't retry if the context is marked as done, it will just error out
// when we attempt to send the retry anyway. // when we attempt to send the retry anyway.
return resp, clues.StackWC(ctx, ctx.Err()) err := clues.StackWC(ctx, ctx.Err())
logger.CtxErr(ctx, err).Info("request context marked done")
return resp, err
case <-timer.C: case <-timer.C:
} }