Skip to content

fix: drop commented import from flows index template - #641

Open
jumski wants to merge 1 commit into
portable-worker-snapshot-publishfrom
portable-worker-flows-template
Open

fix: drop commented import from flows index template#641
jumski wants to merge 1 commit into
portable-worker-snapshot-publishfrom
portable-worker-flows-template

Conversation

@jumski

@jumski jumski commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Why

pgflow install scaffolded supabase/flows/index.ts with a commented-out
example import:

// Example: export { MyFlow } from './my-flow.ts';

The Supabase CLI resolves each function's import graph with a regex over raw
file text
(importPathPattern in apps/cli/src/shared/functions/deploy.ts) —
it does not strip comments. The commented example matches the pattern, the
walker tries to read supabase/flows/my-flow.ts, gets ENOENT, and
supabase start aborts on a fresh project:

failed to read file: open supabase/flows/my-flow.ts: no such file or directory

Reproduced in isolation: fresh supabase init + the comment in a transitive
file → supabase start exits with the error above; deleting only that comment
line → full stack boots.

What

  • flows/index.ts template: drop the commented example import, replace with a
    short warning comment that itself contains no import-shaped text
  • manual-installation docs: same change in the copy-paste snippet
  • regression test: generated index.ts must not reference my-flow

Verification

  • vitest create-flows-directory.test.ts — 7/7 (new assertion caught an
    earlier draft of this fix that quoted the forbidden pattern in its own
    warning comment)
  • ran supabase CLI's exact importPathPattern over the generated file: only
    ./greet-user.ts matches, which exists
  • E2E with the locally built CLI: fresh project → pgflow install
    supabase start boots the full stack (previously failed at bind-mount
    resolution)

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f80f35e

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

This PR includes changesets to release 5 packages
Name Type
pgflow Patch
@pgflow/core Patch
@pgflow/dsl Patch
@pgflow/client Patch
@pgflow/edge-worker 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

@nx-cloud

nx-cloud Bot commented Aug 20, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f80f35e

Command Status Duration Result
nx run edge-worker:e2e:portable-runtimes ❌ Failed 1m 53s View ↗
nx run edge-worker:test:integration ✅ Succeeded 4m 23s View ↗
nx run edge-worker:e2e ✅ Succeeded 53s View ↗
nx run client:e2e ✅ Succeeded 1m 16s 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 3s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 27s View ↗
Additional runs (2) ✅ Succeeded ... View ↗

💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.


☁️ Nx Cloud last updated this comment at 2026-08-20 17:19:10 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.

1 participant