Skip to content

fix: correctly decrement remaining_deps for multiple skipped parents#606

Merged
jumski merged 1 commit intomainfrom
02-06-fix_fixed_decrements_for_remaining_deps
Mar 17, 2026
Merged

fix: correctly decrement remaining_deps for multiple skipped parents#606
jumski merged 1 commit intomainfrom
02-06-fix_fixed_decrements_for_remaining_deps

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Feb 6, 2026

Fix remaining_deps decrement for multiple skipped parents

This PR fixes a bug where child steps with multiple skipped parent steps would not have their remaining_deps decremented correctly. Previously, when multiple parent steps were skipped simultaneously, the child's remaining_deps would only be decremented by 1 regardless of how many parents were skipped.

The fix:

  • Added a new CTE skipped_parent_counts that counts how many skipped parents each child step has
  • Modified the dependent_updates query to decrement remaining_deps by the actual count of skipped parents
  • Added two test cases to verify the fix:
    1. multi_parent_skip_decrements_remaining_deps.test.sql - Tests that when two parent steps are skipped, the child's remaining_deps is decremented by 2
    2. multi_parent_skip_then_complete.test.sql - Tests a more complex scenario with three parents where two are skipped and one completes normally

This ensures that workflows with conditional branches properly advance when multiple parent steps are skipped in the same cascade resolution.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: 1744d31

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Feb 6, 2026

View your CI Pipeline Execution ↗ for commit 1744d31

Command Status Duration Result
nx test:types:health dsl ✅ Succeeded 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-17 19:32:04 UTC

@jumski jumski force-pushed the 02-06-fix_fixed_decrements_for_remaining_deps branch from 91df928 to 0b9906b Compare February 6, 2026 12:14
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-606.pgflow.pages.dev

📝 Details:

  • Branch: 02-06-fix_fixed_decrements_for_remaining_deps
  • Commit: 1a48a0a5e270dc43772dc5421a1ac57b0254764f
  • View Logs

_Last updated: _

Copy link
Contributor Author

jumski commented Mar 17, 2026

Merge activity

  • Mar 17, 7:20 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 17, 7:31 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 17, 7:31 PM UTC: @jumski merged this pull request with Graphite.

@jumski jumski changed the base branch from 01-23-rename_when_failed_to_when_exhausted to graphite-base/606 March 17, 2026 19:27
@jumski jumski changed the base branch from graphite-base/606 to main March 17, 2026 19:29
@jumski jumski force-pushed the 02-06-fix_fixed_decrements_for_remaining_deps branch from 0b9906b to 1744d31 Compare March 17, 2026 19:30
@jumski jumski merged commit 6819539 into main Mar 17, 2026
13 checks passed
@github-actions
Copy link
Contributor

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 68195395801df5e8f6702fdedd4244e57d53ea1e
  • View Logs

Deployed at: 2026-03-17T20:31:31+01:00

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