Skip to content

fix: correctly decrement remaining_deps for multiple skipped parents#606

Open
jumski wants to merge 1 commit into01-23-rename_when_failed_to_when_exhaustedfrom
02-06-fix_fixed_decrements_for_remaining_deps
Open

fix: correctly decrement remaining_deps for multiple skipped parents#606
jumski wants to merge 1 commit into01-23-rename_when_failed_to_when_exhaustedfrom
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: 0b9906b

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

Copy link
Contributor Author

jumski commented Feb 6, 2026

@nx-cloud
Copy link

nx-cloud bot commented Feb 6, 2026

View your CI Pipeline Execution ↗ for commit 0b9906b

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 5m 37s View ↗
nx run client:e2e ✅ Succeeded 2m 59s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 4s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 4s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 2m 27s View ↗
nx run core:pgtap ✅ Succeeded 1m 55s View ↗
nx run cli:e2e ✅ Succeeded 5s View ↗
nx run edge-worker:e2e ✅ Succeeded 41s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-06 12:23:40 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: _

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