Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Dec 4, 2025

Auto-detect environment in ensure_flow_compiled function

This PR modifies the ensure_flow_compiled function to automatically detect the environment using the is_local() function instead of requiring a mode parameter. This simplifies the API by:

  1. Removing the p_mode parameter from the function signature
  2. Using pgflow.is_local() to determine whether to auto-recompile (local) or fail on mismatch (production)

The behavior remains the same:

  • In local environments: automatically recompile flows when shapes differ
  • In production environments: return a mismatch error when shapes differ

Updated tests to verify the auto-detection works correctly in both environments.

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

⚠️ No Changeset found

Latest commit: f2d0658

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 4, 2025

View your CI Pipeline Execution ↗ for commit f2d0658

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

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

@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from a30c83e to 1004149 Compare December 4, 2025 14:42
@jumski jumski changed the base branch from 12-04-add_pgflow_is_local_function to graphite-base/503 December 5, 2025 07:17
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from 1004149 to d2e6ef7 Compare December 5, 2025 07:18
@jumski jumski force-pushed the graphite-base/503 branch from e2e0542 to 62bac21 Compare December 5, 2025 07:18
@jumski jumski changed the base branch from graphite-base/503 to 12-04-add_pgflow_is_local_function December 5, 2025 07:18
@jumski jumski changed the base branch from 12-04-add_pgflow_is_local_function to graphite-base/503 December 5, 2025 09:16
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from d2e6ef7 to b3ec5c2 Compare December 5, 2025 09:24
@jumski jumski force-pushed the graphite-base/503 branch from 62bac21 to 66f7089 Compare December 5, 2025 09:24
@jumski jumski changed the base branch from graphite-base/503 to 12-04-add_pgflow_is_local_function December 5, 2025 09:24
@jumski jumski force-pushed the 12-04-add_pgflow_is_local_function branch from 66f7089 to 948f79e Compare December 5, 2025 10:04
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from b3ec5c2 to 44c5035 Compare December 5, 2025 10:04
@jumski jumski force-pushed the 12-04-add_pgflow_is_local_function branch from 948f79e to dcf6478 Compare December 5, 2025 13:05
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from 44c5035 to e9163f7 Compare December 5, 2025 13:05
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from e9163f7 to f2d0658 Compare December 5, 2025 22:53
@jumski jumski force-pushed the 12-04-add_pgflow_is_local_function branch from dcf6478 to 5166c57 Compare December 5, 2025 22:53
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

  • Branch: 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_
  • Commit: 9397ef1f5e66af88a69873c384a5ea6ef186a592
  • 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