Skip to content

fix: treat conditional skips as successful runs - #2650

Draft
Mbeaulne wants to merge 1 commit into
conditional-execution-uifrom
fix-conditional-run-status
Draft

fix: treat conditional skips as successful runs#2650
Mbeaulne wants to merge 1 commit into
conditional-execution-uifrom
fix-conditional-run-status

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Updates the aggregate run status shown in the runs list for pipelines with conditional execution.

Tangle currently assigns SKIPPED only to a task whose isEnabled condition resolves to false and to tasks downstream of that conditionally skipped task. A successful run can therefore contain both SUCCEEDED and SKIPPED task counts.

This PR changes the terminal status priority so that:

  • SUCCEEDED with conditionally skipped tasks is displayed as Succeeded.
  • A run where every task is skipped is still displayed as Skipped.
  • Failures, cancellations, and in-progress statuses continue to take priority.
  • Individual skipped tasks remain displayed as Skipped in run details.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

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

Screenshots (if applicable)

Not applicable.

Test Instructions

  1. Create a pipeline with at least one task that succeeds and one conditional branch whose condition resolves to false.
  2. Run the pipeline.
  3. Confirm the runs list displays the run as Succeeded.
  4. Open the run and confirm the conditional task and its downstream tasks remain Skipped.
  5. Verify a run containing only skipped tasks is displayed as Skipped.
  6. Verify failed, cancelled, and in-progress tasks continue to determine the overall run status.

Automated checks:

pnpm vitest run src/utils/executionStatus.test.ts
pnpm exec eslint src/utils/executionStatus.ts src/utils/executionStatus.test.ts
pnpm exec tsc --noEmit --pretty false

Additional Comments

The runs-list API returns aggregate status counts rather than task-level skip reasons. This behavior relies on the current Tangle contract that SKIPPED is only produced by conditional execution and its downstream propagation. If another skip reason is introduced, the backend should expose distinct skip reasons or an authoritative overall run status.

@github-actions

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: fix-conditional-run-status/73f3abe

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.

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