Skip to content

fix: handling delete non-active dependent when parent reconcile condition false#3273

Open
csviri wants to merge 7 commits intooperator-framework:mainfrom
csviri:delete-activation-fix
Open

fix: handling delete non-active dependent when parent reconcile condition false#3273
csviri wants to merge 7 commits intooperator-framework:mainfrom
csviri:delete-activation-fix

Conversation

@csviri
Copy link
Copy Markdown
Collaborator

@csviri csviri commented Apr 7, 2026

  • fixes registration and de-registration of dynamic event sources for activation condition
  • simplifies logic workflow reconciler

Signed-off-by: Attila Mészáros a_meszaros@apple.com

…tion false

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 7, 2026
csviri added 3 commits April 7, 2026 13:19
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri marked this pull request as ready for review April 7, 2026 12:26
Copilot AI review requested due to automatic review settings April 7, 2026 12:26
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 7, 2026
@openshift-ci openshift-ci bot requested review from metacosm and xstefank April 7, 2026 12:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the handling of deleting non-active dependents when parent reconciliation conditions are false, and improves the event source management for activation conditions. The changes introduce a condition result caching mechanism to optimize condition evaluation and refactor the deletion logic for better clarity.

Changes:

  • Added condition result caching to avoid redundant evaluations within a single reconciliation cycle
  • Refactored deletion handling to check activation conditions at execution time rather than during marking phase
  • Enhanced InformerEventSource with a guard clause to prevent starting an already-running event source
  • Added test coverage for event source registration/deregistration behavior with activation conditions

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
WorkflowReconcileExecutorTest.java Added EventSourceRetriever mock and three new test cases for activation condition event source management
InformerEventSource.java Added guard clause in start() method to prevent redundant starts
WorkflowReconcileExecutor.java Refactored deletion logic and removed activation condition parameter from handleReconcileOrActivationConditionNotMet
AbstractWorkflowExecutor.java Added condition result caching in isConditionMet() method
BaseWorkflowResult.java Added getConditionResult() method to support condition caching

csviri added 3 commits April 7, 2026 15:07
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.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.

listSyncAndWatch failed for route.openshift encountered for BulkDependentResource with activationCondition downstream of a failing reconcilePrecondition

2 participants