Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Jan 22, 2026

Add support for skipped steps in the client

This PR adds support for handling skipped steps in the PgFlow client. Skipped steps can occur in three scenarios:

  • When a step's condition evaluates to false (condition_unmet)
  • When a dependency was skipped, causing cascading skips (dependency_skipped)
  • When a handler fails during evaluation (handler_failed)

The implementation:

  • Adds a new Skipped status to the FlowStepStatus enum
  • Introduces a SkipReason type to track why a step was skipped
  • Extends FlowStep with skipped_at and skip_reason properties
  • Updates event handling to process skipped step events
  • Treats skipped as a terminal state (like completed and failed)
  • Adds support for waitForStatus(FlowStepStatus.Skipped)

Comprehensive tests verify the client correctly:

  • Handles skipped step state from database snapshots
  • Processes skipped broadcast events
  • Maintains skipped as a terminal state
  • Resolves waitForStatus(Skipped) correctly
  • Handles all skip reasons appropriately

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

⚠️ No Changeset found

Latest commit: c86955f

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 Jan 22, 2026

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.

@nx-cloud
Copy link

nx-cloud bot commented Jan 22, 2026

View your CI Pipeline Execution ↗ for commit c86955f

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

☁️ Nx Cloud last updated this comment at 2026-01-23 23:58:19 UTC

@jumski jumski force-pushed the 01-22-client_skipped_event_support branch from 517b658 to f3531d7 Compare January 22, 2026 23:20
@jumski jumski force-pushed the 01-22-add_edge_worker_conditional_steps_tests branch from d62437b to c495ffd Compare January 22, 2026 23:20
@jumski jumski changed the base branch from 01-22-add_edge_worker_conditional_steps_tests to graphite-base/601 January 23, 2026 07:24
@jumski jumski force-pushed the graphite-base/601 branch from c495ffd to 42f0b9f Compare January 23, 2026 08:09
@jumski jumski force-pushed the 01-22-client_skipped_event_support branch from f3531d7 to 3858291 Compare January 23, 2026 08:09
@jumski jumski changed the base branch from graphite-base/601 to 01-22-add_edge_worker_conditional_steps_tests January 23, 2026 08:09
@jumski jumski force-pushed the 01-22-add_edge_worker_conditional_steps_tests branch from 42f0b9f to 9277953 Compare January 23, 2026 12:22
@jumski jumski force-pushed the 01-22-client_skipped_event_support branch from 3858291 to 192d2c0 Compare January 23, 2026 12:22
@jumski jumski changed the base branch from 01-22-add_edge_worker_conditional_steps_tests to graphite-base/601 January 23, 2026 21:34
@jumski jumski force-pushed the graphite-base/601 branch from 9277953 to e2ec2de Compare January 23, 2026 21:46
@jumski jumski force-pushed the 01-22-client_skipped_event_support branch from 192d2c0 to 6bad9b5 Compare January 23, 2026 21:46
@jumski jumski changed the base branch from graphite-base/601 to 01-22-add_edge_worker_conditional_steps_tests January 23, 2026 21:46
- Add FlowStepStatus.Skipped to enum
- Add SkipReason type (condition_unmet|handler_failed|dependency_skipped)
- Add BroadcastStepSkippedEvent type
- Add skipped event handling to FlowStep class
- Add skipped_at and skip_reason getters
- Update waitForStatus to accept Skipped
- Treat Skipped as terminal state
- Update eventAdapters for skipped events
- Add unit tests, type tests, and E2E tests
- All 206 client tests pass
@jumski jumski force-pushed the 01-22-client_skipped_event_support branch from 6bad9b5 to c86955f Compare January 23, 2026 23:40
@jumski jumski force-pushed the 01-22-add_edge_worker_conditional_steps_tests branch from e2ec2de to 2e12137 Compare January 23, 2026 23:40
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

  • Branch: 01-22-client_skipped_event_support
  • Commit: 94b97caf6ed6af693d092411815bf1081270b57f
  • 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.

2 participants