Skip to content

docs: add conditional steps documentation and skipped step styling#594

Merged
jumski merged 1 commit intomainfrom
01-14-add_docs_for_conditional_steps
Mar 17, 2026
Merged

docs: add conditional steps documentation and skipped step styling#594
jumski merged 1 commit intomainfrom
01-14-add_docs_for_conditional_steps

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Jan 14, 2026

Add Conditional Steps and Error Handling

This PR introduces comprehensive support for conditional step execution and graceful error handling in pgflow. The new features allow workflows to adapt to runtime conditions and handle failures without stopping the entire run.

Key Features

  • Pattern Matching: Control step execution with if/ifNot conditions using PostgreSQL's JSON containment operator
  • Skip Modes: Configure what happens when conditions aren't met with fail, skip, or skip-cascade options
  • Error Handling: Gracefully handle step failures with retriesExhausted: 'skip' for non-critical steps
  • Type Safety: TypeScript types reflect optional dependencies when steps might be skipped

Visual Representation

Added a new step_skipped style to the D2 theme for visualizing skipped steps in flow diagrams.

Documentation

Added comprehensive documentation with:

  • Overview of conditional execution and error handling
  • Pattern matching syntax and examples
  • Skip mode behaviors and use cases
  • Error handling best practices
  • Type safety considerations
  • Visual diagrams showing different execution paths

These features enable more resilient workflows where non-critical steps can fail without stopping the entire process.

@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

🦋 Changeset detected

Latest commit: 39bc3af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@pgflow/core Minor
@pgflow/dsl Minor
pgflow Minor
@pgflow/client Minor
@pgflow/edge-worker Minor

Not sure what this means? Click here to learn what changesets are.

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

@nx-cloud
Copy link

nx-cloud bot commented Jan 14, 2026

View your CI Pipeline Execution ↗ for commit 39bc3af

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

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

@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 1d9f0cf to 8cfa234 Compare January 15, 2026 05:19
@jumski jumski force-pushed the 01-14-fix_skip-cascade_type_bug_only_skip_mode_makes_deps_optional branch from 44482fc to 12c7537 Compare January 20, 2026 09:23
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 8cfa234 to 45fa698 Compare January 20, 2026 09:23
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 45fa698 to 44a7cad Compare January 20, 2026 14:25
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 44a7cad to 117e766 Compare January 20, 2026 17:01
@jumski jumski changed the base branch from 01-14-fix_skip-cascade_type_bug_only_skip_mode_makes_deps_optional to graphite-base/594 January 21, 2026 10:18
@jumski jumski force-pushed the graphite-base/594 branch from 12c7537 to 963cad9 Compare January 21, 2026 10:18
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 117e766 to 56ec88e Compare January 21, 2026 10:18
@jumski jumski changed the base branch from graphite-base/594 to 01-05-condition January 21, 2026 10:19
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 5e56496 to 208f76f Compare January 22, 2026 10:23
@jumski jumski changed the base branch from 01-05-condition to graphite-base/594 January 23, 2026 10:57
@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 graphite-base/594 branch from 963cad9 to 736e5b4 Compare January 23, 2026 12:22
@jumski jumski changed the base branch from graphite-base/594 to 01-05-condition January 23, 2026 12:22
@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-14-add_docs_for_conditional_steps branch from 096d008 to 85fde3b Compare February 3, 2026 10:32
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

  • Branch: 01-14-add_docs_for_conditional_steps
  • Commit: 989f263dfedbfc0d6d3c380f76d8c570c2732d08
  • 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:22 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 17, 7:22 PM UTC: @jumski merged this pull request with Graphite.

@jumski jumski changed the base branch from 01-05-condition to graphite-base/594 March 17, 2026 19:20
@jumski jumski changed the base branch from graphite-base/594 to main March 17, 2026 19:20
@jumski jumski force-pushed the 01-14-add_docs_for_conditional_steps branch from 85fde3b to 39bc3af Compare March 17, 2026 19:21
@jumski jumski merged commit 320a106 into main Mar 17, 2026
12 checks passed
@github-actions
Copy link
Contributor

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 320a10629b272f9376336baa0b021707879da4b8
  • View Logs

Deployed at: 2026-03-17T20:22:26+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