Skip to content

Fixed the operator to ignore workflows and workflow instances marked with mismatching synapse.io/operator labels #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

cdavernas
Copy link
Member

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:

  • Fixes the operator to ignore workflows and workflow instances marked with mismatching synapse.io/operator labels

Fixes #515

…stances marked with mismatching `synapse.io/operator` labels

Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
@cdavernas cdavernas self-assigned this Jul 21, 2025
@cdavernas cdavernas requested a review from Copilot July 21, 2025 10:09
Copy link
Contributor

@Copilot 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 a logic error in operator label checking that prevented the operator from properly ignoring workflows and workflow instances with mismatching synapse.io/operator labels. The fix ensures that when a resource has an operator label that doesn't match the current operator's qualified name, the operator will correctly ignore that resource rather than claiming it.

  • Fixed conditional logic in TryClaimAsync and TryReleaseAsync methods to properly compare operator labels
  • Updated both WorkflowController and WorkflowInstanceController with the same logic correction
  • Changed early return behavior to properly handle mismatched operator labels

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
WorkflowInstanceController.cs Fixed operator label comparison logic in TryClaimAsync and TryReleaseAsync methods
WorkflowController.cs Fixed operator label comparison logic in TryClaimAsync and TryReleaseAsync methods

@cdavernas cdavernas merged commit 7d86e63 into main Jul 21, 2025
2 checks passed
@cdavernas cdavernas deleted the fix-workflow-routing branch July 21, 2025 10:13
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.

Workflow Routing Does Not Respect Operator Labels
1 participant