Skip to content

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
@cdavernas cdavernas added type: bug Something isn't working priority: high Indicates a high priority issue weight: 2 An issue with a low development impact app: operator Concerns the Operator type: fix and removed type: bug Something isn't working labels Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: operator Concerns the Operator priority: high Indicates a high priority issue type: fix weight: 2 An issue with a low development impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow routing does not respect Operator labels
1 participant