Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Nov 30, 2025

Include Options in FlowShape for Proper Flow Creation

This PR adds support for including flow and step options in the FlowShape structure, ensuring that options defined in the DSL are properly passed through to the database during flow creation.

Problem Fixed

Previously, _create_flow_from_shape() was using default values instead of DSL-defined options, causing inconsistency between:

  • CLI path: compileFlow() → SQL with options
  • Runtime path: extractFlowShape()_create_flow_from_shape() → defaults only

Changes

  1. Modified FlowShape and StepShape interfaces to include optional options fields
  2. Updated extractFlowShape() to include flow and step options in the shape
  3. Changed SQL functions to use NULL parameters as "use default" via COALESCE
  4. Updated _create_flow_from_shape() to pass options from shape to create_flow()
  5. Added comprehensive tests for options handling

Design Decision

Options are now included in the shape for proper flow creation, but are still excluded from shape comparison. This maintains the ability to tune options at runtime without triggering recompilation.

SQL functions now treat NULL parameters as "use default" via COALESCE, ensuring defaults are defined in a single place (inside the function) rather than being hardcoded by callers.

@changeset-bot
Copy link

changeset-bot bot commented Nov 30, 2025

⚠️ No Changeset found

Latest commit: 2e949b1

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 Nov 30, 2025

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


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud
Copy link

nx-cloud bot commented Nov 30, 2025

View your CI Pipeline Execution ↗ for commit 2e949b1

Command Status Duration Result
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 4s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 25s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 4m 37s View ↗
nx run edge-worker:e2e ✅ Succeeded 2m 50s View ↗
nx run cli:e2e ✅ Succeeded 6s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-30 16:58:47 UTC

@jumski jumski force-pushed the 11-30-include_options_in_flowshape_for_proper_flow_creation branch from 73a4f1d to 2e949b1 Compare November 30, 2025 16:49
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

  • Branch: 11-30-include_options_in_flowshape_for_proper_flow_creation
  • Commit: 9456934b3684038e26c41803c3c555443b012ccb
  • 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