Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Dec 23, 2025

Add flow_input field to step_task_record for direct access to original run input

This PR adds a new flow_input field to the step_task_record type, which provides workers direct access to the original flow input without having to parse it from the constructed input field.

Key changes:

  • Added flow_input attribute to the pgflow.step_task_record composite type
  • Updated the start_tasks function to populate this field with the original run input
  • Added database migration script to apply these changes
  • Added tests to verify the flow_input field is correctly populated for:
    • Root steps
    • Dependent steps
    • Map steps (all tasks receive the same original array)
    • Multiple tasks in a batch

This enhancement simplifies worker implementation by providing direct access to the original flow input, which is particularly useful for context that needs to be available to all steps.

- Updated step_task_record type to include flow_input jsonb attribute
- Modified start_tasks function to set flow_input as original run input for tasks
- Added migration script to alter type and update start_tasks logic
- Enhanced tests to verify flow_input matches original run input in various scenarios
- Ensured consistent flow_input propagation for root, dependent, and map steps
@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

⚠️ No Changeset found

Latest commit: 869250d

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

@nx-cloud
Copy link

nx-cloud bot commented Dec 23, 2025

View your CI Pipeline Execution ↗ for commit 869250d

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 5m 23s View ↗
nx run client:e2e ✅ Succeeded 2m 58s 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 1m 50s View ↗
nx run core:pgtap ✅ Succeeded 1m 43s View ↗
nx run edge-worker:e2e ✅ Succeeded 50s View ↗
nx run cli:e2e ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-23 05:42:36 UTC

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