Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Jan 22, 2026

Add conditional flow execution and retry handling

This PR introduces conditional flow execution and retry handling capabilities to the PGFlow system. It adds:

  1. Conditional step execution with if and ifNot patterns that can:

    • Skip steps when conditions are not met
    • Optionally cascade skips to dependent steps
    • Fail the run when required conditions aren't met
  2. Retry exhaustion handling that can:

    • Skip steps after retries are exhausted
    • Cascade skips to dependent steps
    • Configure different behavior per step

The implementation includes comprehensive test coverage for:

  • Basic conditional execution with required and forbidden patterns
  • Skip cascading behavior to dependent steps
  • Non-cascading skips where downstream steps can still run
  • Failure handling when conditions aren't met
  • Multiple retry attempts before skipping
  • Combined condition and failure handling scenarios

These features enable more robust workflow definitions with better handling of optional steps, error conditions, and dependencies between steps.

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

⚠️ No Changeset found

Latest commit: 2e12137

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 2e12137

Command Status Duration Result
nx run core:pgtap ✅ Succeeded 1m 34s View ↗
nx run cli:e2e ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-24 10:14:31 UTC

@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 force-pushed the 01-22-add_edge_worker_conditional_steps_tests branch from c495ffd to 42f0b9f Compare January 23, 2026 07:25
@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-14-add_docs_for_conditional_steps branch from 208f76f to b7b1a8c Compare January 23, 2026 12:22
@jumski jumski force-pushed the 01-22-add_edge_worker_conditional_steps_tests branch from 9277953 to e2ec2de Compare January 23, 2026 21:34
… flow logic

- Introduced new helper functions for creating flows and retrieving step states with skip and
error info
- Added detailed integration tests covering conditional step execution, skipping, cascade
behavior, and optional dependencies
- Included tests for 'if', 'ifNot', 'whenUnmet', 'whenFailed' conditions, and cascade vs
non-cascade skips
- Created a new test file for retries exhausted scenarios (placeholder for future tests)
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from b7b1a8c to 096d008 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-600.pgflow.pages.dev

📝 Details:

  • Branch: 01-22-add_edge_worker_conditional_steps_tests
  • Commit: 83ea3610f92c957f004b123c572437670b6cea4a
  • 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