fix(applications): wire newArgocdClientFn in Application controller connector - #373
Open
gravufo wants to merge 1 commit into
Open
Conversation
gravufo
force-pushed
the
fix/application-controller-nil-client-connector
branch
from
August 24, 2026 21:33
6b403d9 to
a1aa899
Compare
…onnector Setup() built the connector without setting newArgocdClientFn (unlike every other controller, e.g. projects), leaving it nil. Connect() -> NewExternal() then invokes that nil function pointer, which panics. controller-runtime recovers the panic and requeues with backoff instead of crashing, so the Application managed resource silently never reconciles: no error is logged, no event is recorded, and .status is never populated, even though the underlying ArgoCD Application is healthy. Signed-off-by: Christian Artin <cartin@genetec.com>
gravufo
force-pushed
the
fix/application-controller-nil-client-connector
branch
from
August 24, 2026 21:37
a1aa899 to
eba4e73
Compare
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.
Summary
Fixes #372.
Setup()for theApplicationcontroller built itsconnectorwithout settingnewArgocdClientFn, leaving itnil. EveryConnect()call then invokes that nil function pointer insideNewExternal(), panicking on every reconcile.controller-runtimerecovers the panic and requeues with backoff instead of crashing, so the resource silently never gets its status populated — no error, no event, nothing beyond a bareReconcilinglog line forever.This brings
applications/controller.goin line withprojects/controller.goandcluster/controller.go, which already wire their respectivenewArgocdClientFn(projects.NewProjectServiceClient, etc.) into the connector.Change
Test plan
go build ./pkg/controller/cluster/applications/...go vet ./pkg/controller/cluster/applications/...Applicationmanaged resources never populated.statusand the controller logged only a repeating bareReconcilingline with no follow-up (unlikeCluster/Project, which log the full observe/update sequence). Manually patching.statusdirectly on the object and observing it survive multiple poll cycles untouched confirmed the controller was never reaching any status-updating code path.