chore: argo agent retries on context deadline err - #1117
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds context deadline exceeded error handling to the ArgoCD application upsert retry logic. The ChangesContext Deadline Exceeded Retry Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the workspace-engine ArgoCD job agent retry classification so that context deadline exceeded errors are treated as retryable during application upserts, addressing issue #1070.
Changes:
- Extend
isRetryableErrorto treatcontext.DeadlineExceeded(and matching error strings) as retryable. - Add unit test coverage for deadline-exceeded retryability detection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/workspace-engine/pkg/jobagents/argo/application_upserter.go | Marks deadline-exceeded errors as retryable for ArgoCD application upserts. |
| apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go | Adds test cases verifying context deadline exceeded is considered retryable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -85,7 +89,8 @@ func isRetryableError(err error) bool { | |||
| strings.Contains(errStr, "timeout") || | |||
| strings.Contains(errStr, "temporarily unavailable") || | |||
| strings.Contains(errStr, "EOF") || | |||
| strings.Contains(errStr, "Unavailable") | |||
| strings.Contains(errStr, "Unavailable") || | |||
| strings.Contains(errStr, "context deadline exceeded") | |||
| {"context deadline exceeded sentinel", context.DeadlineExceeded, true}, | ||
| { | ||
| "context deadline exceeded wrapped", | ||
| fmt.Errorf("rpc error: code = DeadlineExceeded desc = context deadline exceeded"), |
fixes #1070
Summary by CodeRabbit