Feat: make reconcile timeout configurable via --reconcile-timeout flag#228
Open
qiaoxincheng880624-sudo wants to merge 1 commit intokubevela:mainfrom
Open
Conversation
Previously ReconcileTimeout was a hardcoded package-level variable (3m)
with no way to override it. This caused workflowruns with large numbers
of steps (1000+) to consistently fail with context deadline exceeded
when attempting to patch status at the end of each reconcile cycle.
Changes:
- Add ReconcileTimeout field to Args struct
- Rename package var to DefaultReconcileTimeout constant
- Use r.Args.ReconcileTimeout in both WorkflowRunReconciler and BackupReconciler,
falling back to DefaultReconcileTimeout if not set
- Register --reconcile-timeout flag in cmd/main.go (default: 3m)
Usage: --reconcile-timeout=30m
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #228 +/- ##
==========================================
+ Coverage 62.49% 67.62% +5.13%
==========================================
Files 62 65 +3
Lines 4415 5415 +1000
==========================================
+ Hits 2759 3662 +903
- Misses 1324 1367 +43
- Partials 332 386 +54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Problem
WorkflowRun reconcile timeout is hardcoded to 3 minutes in
controllers/workflowrun_controller.go. There is no way to configurethis value at runtime, which causes failures for large workflowruns
(1000+ steps):
failed to patch workflowrun status: client rate limiter Wait returned
an error: context deadline exceeded
The reconcile context expires at exactly 3 minutes, and the final
patchStatuscall fails because the context is already dead when therate limiter's
Wait(ctx)checks it.Solution
ReconcileTimeout time.DurationtoArgsstruct--reconcile-timeoutflag (default:3mto preserve backward compatibility)r.Args.ReconcileTimeoutin Reconcile functionUsage