feat(stack): rewrite managed local stack runtime - #6440
Open
jgoux wants to merge 179 commits into
Open
Conversation
…-rewrite # Conflicts: # apps/cli/README.md # apps/cli/package.json # apps/cli/src/next/cli/root.ts # apps/cli/src/next/commands/branches/switch/switch.handler.ts # apps/cli/src/next/commands/branches/switch/switch.integration.test.ts # apps/cli/src/next/commands/functions/dev/dev.command.ts # apps/cli/src/next/commands/functions/dev/dev.e2e.test.ts # apps/cli/src/next/commands/functions/dev/dev.handler.ts # apps/cli/src/next/commands/functions/dev/functions-dev-runtime.ts # apps/cli/src/next/commands/functions/download/download.integration.test.ts # apps/cli/src/next/commands/functions/list/list.integration.test.ts # apps/cli/src/next/commands/functions/new/new.integration.test.ts # apps/cli/src/next/commands/link/link.handler.ts # apps/cli/src/next/commands/list/list.handler.ts # apps/cli/src/next/commands/login/login.handler.ts # apps/cli/src/next/commands/logs/logs.command.ts # apps/cli/src/next/commands/logs/logs.handler.ts # apps/cli/src/next/commands/logs/logs.integration.test.ts # apps/cli/src/next/commands/services/services.handler.ts # apps/cli/src/next/commands/services/services.integration.test.ts # apps/cli/src/next/commands/start/start.command.ts # apps/cli/src/next/commands/start/start.command.unit.test.ts # apps/cli/src/next/commands/start/start.handler.ts # apps/cli/src/next/commands/start/start.integration.test.ts # apps/cli/src/next/commands/status/status.command.ts # apps/cli/src/next/commands/status/status.handler.ts # apps/cli/src/next/commands/status/status.integration.test.ts # apps/cli/src/next/commands/stop/stop.command.ts # apps/cli/src/next/commands/stop/stop.handler.ts # apps/cli/src/next/commands/stop/stop.integration.test.ts # apps/cli/src/next/commands/update/update.command.ts # apps/cli/src/next/commands/update/update.handler.ts # apps/cli/src/next/commands/update/update.integration.test.ts # apps/cli/src/next/config/project-link-refresh.ts # apps/cli/src/next/config/project-link-remote.layer.ts # apps/cli/src/next/config/stack-config.ts # apps/cli/src/next/config/stack-config.unit.test.ts # apps/cli/src/next/main.ts # apps/cli/src/shared/cli/run.ts # apps/cli/src/shared/runtime/file-watcher.service.ts # apps/cli/tests/helpers/mocks.ts # pnpm-lock.yaml # pnpm-workspace.yaml
…-rewrite # Conflicts: # .gitignore
Contributor
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@c25f8da2b2e10467bd7be4ab413787d09476ae9bPreview package for commit |
…time-rewrite # Conflicts: # packages/process-compose/package.json # packages/process-compose/vitest.config.ts # packages/stack/package.json # pnpm-lock.yaml
Reuse validated native artifacts without fetching upstream checksums. Keep input materialization and shared container setup scoped to startup while preserving dependency readiness and rollback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites
@supabase/stackaround one managed-only runtime shared by strict native and container execution modes. The package owns durable configuration and secrets, sticky ports, artifact preparation, lifecycle arbitration, per-service eager or lazy activation, service migrations, ingress, retained and live logs, and exact resource cleanup.A stopped stack has no resident supervisor or runtime resources: status and retained logs come from durable state, while a later start creates a fresh owner and performs clean recovery. PostgreSQL 17 is the only eager service by default; other enabled services activate through stack ingress, and callers can configure eager activation. Dependency-ready workloads start concurrently. Docker-compatible engines, including Podman, share the same container path.
Enabled lazy services prepare their artifacts in the background after startup by default.
preparation: "on-demand"retains full lazy downloading, while explicitprepare()remains available in either mode. Foreground activation prepares its dependency closure concurrently and shares in-flight downloads with background preparation. Runtime cleanup cancels unfinished transfers and retains completed cache entries. Status exposes artifact preparation separately from service readiness, and explicit preparation reports progress throughonProgress.Edge Functions are served through the stack-owned Edge Runtime. The retained legacy Functions development command uses this package surface; broader integration with the legacy CLI under
experimental startis deferred to follow-up work. The deletednextCLI was a disposable proving ground and is not part of this PR.Service preparation now lives in the published runtime artifacts: PostgreSQL owns first boot and bundled migrations, service helpers own migration and Pooler tenant provisioning, and Node services expose public launchers shared with their images. The stack supplies instance settings and sequences those commands. The affected images are pinned to verified digests from slim-services #299; Vector configuration and Edge Functions bootstrap remain stack-owned.
Obsolete process-compose integration and superseded runtime helpers are removed.
Supersedes #6385