Skip to content

fix: improve local environment detection using SUPABASE_URL instead of API keys#580

Merged
jumski merged 1 commit intomainfrom
01-07-detect_local_dev_based_on_supabase_url_env_var
Jan 7, 2026
Merged

fix: improve local environment detection using SUPABASE_URL instead of API keys#580
jumski merged 1 commit intomainfrom
01-07-detect_local_dev_based_on_supabase_url_env_var

Conversation

@jumski
Copy link
Copy Markdown
Contributor

@jumski jumski commented Jan 7, 2026

Fix Local Environment Detection and Optimize Step Output Storage

This PR fixes the local environment detection in pgflow by using SUPABASE_URL instead of API keys, which resolves compatibility issues with recent Supabase CLI versions. The previous detection method relied on matching specific API key patterns, but this became unreliable as Supabase CLI evolved.

Key changes:

  • Changed local environment detection to check for SUPABASE_URL: 'http://kong:8000' instead of matching API keys
  • Updated all tests to use the new URL-based detection method
  • Renamed release notes from 0.13.0 to 0.13.1 since 0.13.0 was yanked due to the detection issue
  • Added step output storage optimization that makes Map chains run 2x faster by storing outputs in step_states.output instead of aggregating them on-demand

This release (0.13.1) includes both the fix for local environment detection and the performance improvements for Map chains that were originally intended for 0.13.0.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: bc150b0

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

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

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

Copy link
Copy Markdown
Contributor Author

jumski commented Jan 7, 2026

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Jan 7, 2026

View your CI Pipeline Execution ↗ for commit bc150b0

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 3m 48s View ↗
nx run edge-worker:e2e ✅ Succeeded 48s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded <1s View ↗
nx affected -t build --configuration=production... ✅ Succeeded <1s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 20s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-07 21:29:57 UTC

Refactors local environment detection to rely on SUPABASE_URL host matching
LOCAL_SUPABASE_HOST instead of deprecated keys.
Updates related tests to use
correct environment variables and URLs, ensuring consistent local environment
recognition and test accuracy.
Also includes minor adjustments to test data
and environment setup for clarity and reliability.
@jumski jumski force-pushed the 01-07-detect_local_dev_based_on_supabase_url_env_var branch from f050d63 to bc150b0 Compare January 7, 2026 21:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 7, 2026

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

  • Branch: 01-07-detect_local_dev_based_on_supabase_url_env_var
  • Commit: e429ce1ef56ffc31cbf255dabf60386d65c41b01
  • View Logs

_Last updated: _

Copy link
Copy Markdown
Contributor Author

jumski commented Jan 7, 2026

Merge activity

  • Jan 7, 10:13 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 7, 10:13 PM UTC: @jumski merged this pull request with Graphite.

@jumski jumski merged commit 199fbe1 into main Jan 7, 2026
14 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 7, 2026

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 199fbe1296a96e3b4ea400bca7675fb89f66af40
  • View Logs

Deployed at: 2026-01-07T23:13:15+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