Skip to content

feat: emit recovery event when reconciliation succeeds after failure#1608

Open
Iam-Karan-Suresh wants to merge 1 commit intofluxcd:mainfrom
Iam-Karan-Suresh:fix/recovery-event-flux2-5738
Open

feat: emit recovery event when reconciliation succeeds after failure#1608
Iam-Karan-Suresh wants to merge 1 commit intofluxcd:mainfrom
Iam-Karan-Suresh:fix/recovery-event-flux2-5738

Conversation

@Iam-Karan-Suresh
Copy link

Description

This PR addresses the "Ghost Failure" issue where a Kustomization that previously failed (sending a Red X to Git status) does not send a recovery event once the issue is resolved.

Following the implementation of RFC-0008, this change ensures that if a reconciliation succeeds and the object was previously in a non-ready state, an explicit Normal event is emitted with the commit-status: update metadata.

Changes

  • Snapshot the readiness state at the start of Reconcile.
  • Added a conditional check at the end of the success path to detect recovery.
  • Emitted an annotated event with eventv1.MetaCommitStatusKey to ensure notification-controller updates the Git commit status.

Testing

  1. Created a Kustomization pointing to a non-existent path (Verified Warning event and Red X in Git).
  2. Updated the Kustomization with the correct path.
  3. Verified a Normal event was emitted: "Reconciliation recovered from failure...".
  4. Verified Git status changed to Green Checkmark.

Part of: fluxcd/flux2#5738
Depends on: fluxcd/pkg#1087
Screenshot from 2026-03-01 23-05-22

Signed-off-by: Iam-karan-suresh <karansuresh.info@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant