Skip to content

fix: Do not allow conditional execution on Subgraph Nodes + Validations - #2658

Open
camielvs wants to merge 1 commit into
08-20-feat_finalize_conditional_executionfrom
08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes
Open

fix: Do not allow conditional execution on Subgraph Nodes + Validations#2658
camielvs wants to merge 1 commit into
08-20-feat_finalize_conditional_executionfrom
08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes

Conversation

@camielvs

@camielvs camielvs commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Description

Conditional execution only works on tasks that run a container. The backend rejects it on subgraphs, so a pipeline that gates one fails at submission with a raw error the user can't act on.

The control is hidden for subgraphs. The Conditional execution box no longer appears when the selected node is a subgraph, so it can't be switched on by accident.

Validation covers what hiding the control can't. A pipeline can arrive with the condition already set — from the SDK, from hand-written YAML, or from an earlier version of the editor. A subgraph with a run condition is now flagged as an error that blocks submission, with a Remove Condition fix offered in the issue panel.

Three related checks, since the same panel was already open:

  • A component that declares an input named __is_enabled__ collides with the name the editor reserves for run conditions. Connecting such an input would silently save it as the task's run condition and drop the argument. It's a warning as soon as the component is used, and an error once the input is actually connected.
  • A condition wired to a value that can't be read as true or false — a number, say — is an error. Anything else blocks submission too, and for the same reason: the run doesn't fail up front, it fails at the moment the task is reached, after everything upstream has already spent its compute. Catching it before submission is worth doing.
  • A fixed condition that isn't true or false — someone's hand-written yes, or a value the editor can't make sense of — is an error, and the message quotes the offending value. Casing and stray whitespace are fine. A condition that's wired up rather than fixed is left alone, since its value isn't known until the run.

Related Issue and Pull requests

Stacked on #2657.

Type of Change

  • Bug fix

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

The conditional-execution flag is off by default — turn it on in Settings first.

  1. Select a subgraph node → Config tab. There should be no Conditional execution box. Select an ordinary task and confirm it's still there.
  2. Hand-edit a pipeline's YAML so a subgraph task is gated on a condition, then open it. The issue panel should show an error, submission should be blocked, and Remove Condition should clear it.
  3. Gate an ordinary task on a number-typed output. You should get an error explaining the value can't be read as a condition, and submission should be blocked. Re-wire it to a String or Boolean output and the error should clear.
  4. Hand-edit a task's condition to something like yes. You should get an error quoting that value. Change it to TRUE or false and it should be accepted.

Additional Comments

The reserved-name check is a guard against a name collision rather than something a user is likely to hit — a component would have to declare an input called __is_enabled__. It's here because the failure is silent: the argument disappears on save with nothing to indicate why.

The type check accepts str, bool and text alongside the canonical type names. Since it blocks submission, a hand-written component using a lowercase alias shouldn't be caught by it.

One thing deliberately not done: the accepted conditions aren't normalized on load. The checks read leniently but write nothing — quietly rewriting a value in someone's pipeline is worse than reporting it.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes/f389987

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camielvs
camielvs force-pushed the 08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes branch from 2f04588 to 8fe1221 Compare August 21, 2026 16:52
@camielvs
camielvs force-pushed the 08-20-feat_finalize_conditional_execution branch from 325c67e to 2d0ce95 Compare August 21, 2026 16:52
@camielvs
camielvs force-pushed the 08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes branch 2 times, most recently from 07f8fcc to f194b0e Compare August 21, 2026 17:26
@camielvs
camielvs marked this pull request as ready for review August 21, 2026 17:26
@camielvs
camielvs requested a review from a team as a code owner August 21, 2026 17:26
Comment thread src/models/componentSpec/validation/validateSpec.ts
Comment thread src/models/componentSpec/validation/validateSpec.ts Outdated
@camielvs
camielvs force-pushed the 08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes branch from f194b0e to b4fefab Compare August 21, 2026 22:10
@camielvs
camielvs requested a review from Mbeaulne August 21, 2026 22:38
@camielvs camielvs changed the title fix: Do not allow conditional execution on Subgraph Nodes fix: Do not allow conditional execution on Subgraph Nodes + Validations Aug 21, 2026
@camielvs
camielvs force-pushed the 08-20-fix_do_not_allow_conditional_execution_on_subgraph_nodes branch from b4fefab to f389987 Compare August 21, 2026 22:55
@camielvs
camielvs force-pushed the 08-20-feat_finalize_conditional_execution branch from 2d0ce95 to 20b5ec3 Compare August 21, 2026 22:55
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.

2 participants