Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/cli-go/pkg/config/templates/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ FROM supabase/postgres:17.6.1.158 AS pg
# Append to ServiceImages when adding new dependencies below
FROM library/kong:2.8.1 AS kong
FROM axllent/mailpit:v1.30.2 AS mailpit
FROM postgrest/postgrest:v14.15 AS postgrest
FROM postgrest/postgrest:v14.16 AS postgrest
Comment thread
jgoux marked this conversation as resolved.
FROM supabase/postgres-meta:v0.96.6 AS pgmeta
FROM supabase/studio:2026.07.27-sha-cbb076d AS studio
FROM supabase/studio:2026.08.03-sha-022b374 AS studio
FROM darthsim/imgproxy:v3.8.0 AS imgproxy
FROM supabase/edge-runtime:v1.74.2 AS edgeruntime
FROM supabase/edge-runtime:v1.74.3 AS edgeruntime
Comment thread
jgoux marked this conversation as resolved.
FROM timberio/vector:0.53.0-alpine AS vector
FROM supabase/supavisor:2.9.7 AS supavisor
FROM supabase/gotrue:v2.194.0 AS gotrue
FROM supabase/realtime:v2.120.3 AS realtime
FROM supabase/storage-api:v1.67.20 AS storage
FROM supabase/logflare:1.47.1 AS logflare
FROM supabase/gotrue:v2.195.0 AS gotrue
FROM supabase/realtime:v2.123.1 AS realtime
FROM supabase/storage-api:v1.68.1 AS storage
FROM supabase/logflare:1.49.2 AS logflare
# Append to JobImages when adding new dependencies below
FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ
FROM supabase/migra:3.0.1663481299 AS migra
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import {
ProcessControl,
type CliProcessSignal,
} from "../../../../shared/runtime/process-control.service.ts";
import { dockerfileServiceImage } from "../../../../shared/services/dockerfile-images.ts";
import { legacyGetRegistryImageUrl } from "../../../shared/legacy-docker-registry.ts";
import type { LegacyFunctionsServeFlags } from "./serve.handler.ts";

const deployMockState = vi.hoisted(() => ({
Expand Down Expand Up @@ -617,6 +619,9 @@ describe("legacy functions serve integration", () => {
throw new Error("expected docker run call");
}

expect(dockerRun.args).toContain(
legacyGetRegistryImageUrl(dockerfileServiceImage("edgeruntime")),
);
expect(dockerRun.args.join(" ")).not.toContain(multilineValue);
expect(dockerRun.args.join(" ")).not.toContain("EOF_ENV_0");

Expand Down
18 changes: 9 additions & 9 deletions apps/cli/src/legacy/shared/legacy-edge-runtime-image.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { Effect, type FileSystem, type Path } from "effect";
import { dockerfileServiceImage } from "../../shared/services/dockerfile-images.ts";

/**
* Resolves the edge-runtime Docker image the way Go's `config.Load` does
* (`apps/cli-go/pkg/config/config.go:445,682-683,999-1007`), for the
* declarative pg-delta scripts that run inside the edge-runtime container.
*
* The default tag is baked into the Go binary via the embedded Dockerfile
* (`FROM supabase/edge-runtime:v1.74.2 AS edgeruntime`), mirrored here as a
* constant. A pinned tag in `supabase/.temp/edge-runtime-version` overrides it
* (written by `supabase start`). `edge_runtime.deno_version = 1` selects the
* legacy `deno1` image instead (default `deno_version = 2` keeps v1.74.2).
* The default tag is baked into the Go binary via the embedded Dockerfile. A
* pinned tag in `supabase/.temp/edge-runtime-version` overrides it (written by
* `supabase start`). `edge_runtime.deno_version = 1` selects the legacy `deno1`
* image instead (default `deno_version = 2` keeps the Dockerfile image).
*/

// `FROM supabase/edge-runtime:v1.74.2 AS edgeruntime` (embedded Dockerfile).
export const LEGACY_EDGE_RUNTIME_IMAGE = "supabase/edge-runtime:v1.74.2";
export const LEGACY_EDGE_RUNTIME_IMAGE = dockerfileServiceImage("edgeruntime");
// `deno1` (`pkg/config/constants.go:15`) — used when `deno_version = 1`.
const LEGACY_EDGE_RUNTIME_DENO1_IMAGE = "supabase/edge-runtime:v1.68.4";

Expand All @@ -26,8 +25,9 @@ function replaceImageTag(image: string, tag: string): string {
/**
* Resolve the edge-runtime image, honoring the pinned tag in
* `supabase/.temp/edge-runtime-version` and the `deno_version` selector
* (default 2 → v1.74.2; 1 → `deno1`). The version pin is applied first (Go's
* `Load`), then `deno_version = 1` overrides to `deno1` (Go's validate pass).
* (default 2 → Dockerfile image; 1 → `deno1`). The version pin is applied first
* (Go's `Load`), then `deno_version = 1` overrides to `deno1` (Go's validate
* pass).
*/
export const legacyResolveEdgeRuntimeImage = Effect.fnUntraced(function* (
fs: FileSystem.FileSystem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BunServices } from "@effect/platform-bun";
import { describe, expect, it } from "@effect/vitest";
import { Effect, FileSystem, Path } from "effect";

import { dockerfileServiceImage } from "../../shared/services/dockerfile-images.ts";
import { legacyResolveEdgeRuntimeImage } from "./legacy-edge-runtime-image.ts";

const resolve = (workdir: string, denoVersion: number) =>
Expand All @@ -15,12 +16,12 @@ const resolve = (workdir: string, denoVersion: number) =>
}).pipe(Effect.provide(BunServices.layer));

describe("legacyResolveEdgeRuntimeImage", () => {
it.effect("returns the default v1.74.2 image when nothing is pinned", () => {
it.effect("returns the edge-runtime image from the Dockerfile when nothing is pinned", () => {
const dir = mkdtempSync(join(tmpdir(), "legacy-edge-img-"));
return resolve(dir, 2).pipe(
Effect.tap((image) =>
Effect.sync(() => {
expect(image).toBe("supabase/edge-runtime:v1.74.2");
expect(image).toBe(dockerfileServiceImage("edgeruntime"));
rmSync(dir, { recursive: true, force: true });
}),
),
Expand Down
8 changes: 5 additions & 3 deletions apps/cli/src/shared/functions/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
type FileWatchEvent,
} from "../runtime/file-watcher.service.ts";
import { ProcessControl } from "../runtime/process-control.service.ts";
import { dockerfileServiceImage } from "../services/dockerfile-images.ts";
import {
buildDockerBinds,
discoverFunctionSlugs,
Expand Down Expand Up @@ -95,7 +96,7 @@ const ignoredDirNames = new Set([
]);
const dockerLogRetryDelay = Duration.millis(400);
const dockerLogDiagnosticTailLength = 4_096;
const legacyDefaultEdgeRuntimeVersion = "v1.74.2";
const legacyDefaultEdgeRuntimeImage = dockerfileServiceImage("edgeruntime");
const defaultSupabaseEnv = "development";
const serveMainContainerPath = "/root/index.ts";
const shellVariableNamePattern = /^[A-Za-z_][A-Za-z0-9_]*$/;
Expand Down Expand Up @@ -1748,14 +1749,15 @@ const startEdgeRuntime = Effect.fnUntraced(function* (input: {
).pipe(
Effect.map((value) => value.trim()),
Effect.catch(() => Effect.succeed("")),
Effect.map((value) => value || legacyDefaultEdgeRuntimeVersion),
);
const edgeRuntimeVersion = yield* resolveEdgeRuntimeVersion(
resolved.edgeRuntime.deno_version,
edgeRuntimeVersionOverride,
);
const image = legacyGetRegistryImageUrl(
`supabase/edge-runtime:${edgeRuntimeImageTag(edgeRuntimeVersion)}`,
edgeRuntimeVersion.length === 0
? legacyDefaultEdgeRuntimeImage
: `supabase/edge-runtime:${edgeRuntimeImageTag(edgeRuntimeVersion)}`,
);

yield* assertLocalDbRunning(projectId);
Expand Down
14 changes: 7 additions & 7 deletions packages/stack/src/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ export interface VersionManifest {

export const DEFAULT_VERSIONS: VersionManifest = {
postgres: "17.6.1.158",
postgrest: "14.15",
auth: "2.194.0",
"edge-runtime": "1.74.2",
realtime: "2.120.3",
storage: "1.67.20",
postgrest: "14.16",
auth: "2.195.0",
"edge-runtime": "1.74.3",
realtime: "2.123.1",
storage: "1.68.1",
imgproxy: "v3.8.0",
mailpit: "v1.30.2",
pgmeta: "0.96.6",
studio: "2026.07.27-sha-cbb076d",
analytics: "1.47.1",
studio: "2026.08.03-sha-022b374",
analytics: "1.49.2",
vector: "0.53.0-alpine",
pooler: "2.9.7",
} as const;
Expand Down
Loading