fix: requeue at dependency interval for missing object refs - #1734
Closed
Bisman-Singh wants to merge 1 commit into
Closed
fix: requeue at dependency interval for missing object refs#1734Bisman-Singh wants to merge 1 commit into
Bisman-Singh wants to merge 1 commit into
Conversation
When the referenced Source object or a Kubernetes object referenced in the build, e.g. a non-optional substituteFrom ConfigMap/Secret, does not exist yet, requeue at the --requeue-dependency interval instead of the retry interval. This is consistent with how not ready dependencies and missing source artifacts are already handled, and speeds up bootstrap ordering when the referenced objects are created shortly after the Kustomization. Part of fluxcd/flux2#5809 Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>
Bisman-Singh
marked this pull request as ready for review
September 1, 2026 07:11
Author
|
Flagging a scope question raised on fluxcd/flux2#5809: unlike helm-controller, this controller has no exponential backoff on these paths. Every reconcile failure already returns |
Author
|
Closing per the discussion on fluxcd/flux2#5809. |
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.
Part of fluxcd/flux2#5809
When the referenced Source object does not exist, the controller requeued at the retry interval; when a non-optional
substituteFromConfigMap/Secret does not exist, the failure fell into the generic reconcile-error path, also requeueing at the retry interval. Both are inconsistent with how not ready dependencies, nil source artifacts and missing artifact files are handled, all of which requeue at the--requeue-dependencyinterval, and they delay bootstrap ordering when the referenced objects are created shortly after the Kustomization (e.g. via a ResourceSet).This change:
--requeue-dependencywhen the source object is not found;substituteFromConfigMap/Secret) with a sentinelerrBuildRefNotFoundand requeues them at--requeue-dependency, alongside the existingfetch.ErrFileNotFoundhandling. The Ready=False condition withBuildFailedReasonand the full error message is still recorded.The check is deliberately scoped to the build step rather than a blanket
apierrors.IsNotFound(reconcileErr):fluxcd/pkg/ssawraps apply errors with%w, so a blanket check would also reroute apply-time NotFound failures (e.g. a namespace that does not exist) away from their error events.Tests: new
TestKustomizationReconciler_RequeueOnMissingRefsasserts the returnedRequeueAfterequals the dependency interval for both scenarios; both subtests were verified to fail against the unfixed code (they observed the 10m retry interval).Signed-off-by: Bisman-Singh bismanmadaan1@gmail.com