Repository: supabase/cli
Pull request #1264 (2023-06-30 07:12:27)

chore: remove deno relay code
Follow up to https://github.com/supabase/cli/pull/1171

coveralls: ## Pull Request Test Coverage Report for [Build 5420366514](https://coveralls.io/builds/61060222)

* **15** of **25**   **(60.0%)**  changed or added relevant lines in **5** files are covered.
* **10** unchanged lines in **2** files lost coverage.
* Overall coverage increased (+**0.1%**) to **61.989%**

---

|  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [cmd/functions.go](https://coveralls.io/builds/61060222/source?filename=cmd%2Ffunctions.go#L102) | 0 | 1 | 0.0%
| [internal/start/start.go](https://coveralls.io/builds/61060222/source?filename=internal%2Fstart%2Fstart.go#L157) | 9 | 18 | 50.0%
<!-- | **Total:** | **15** | **25** | **60.0%** | -->

|  Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [internal/utils/colors.go](https://coveralls.io/builds/61060222/source?filename=internal%2Futils%2Fcolors.go#L12) | 3 | 50.0% |
| [internal/gen/keys/keys.go](https://coveralls.io/builds/61060222/source?filename=internal%2Fgen%2Fkeys%2Fkeys.go#L94) | 7 | 7.94% |
<!-- | **Total:** | **10** |  | -->

|  Totals | [![Coverage Status](https://coveralls.io/builds/61060222/badge)](https://coveralls.io/builds/61060222) |
| :-- | --: |
| Change from base [Build 5420037423](https://coveralls.io/builds/61059674): |  0.1% |
| Covered Lines: | 4669 |
| Relevant Lines: | 7532 |

---
##### 💛  - [Coveralls](https://coveralls.io)


Patch:
diff --git a/cmd/functions.go b/cmd/functions.go
index 97453ccd..be0bed07 100644
--- a/cmd/functions.go
+++ b/cmd/functions.go
@@ -99,7 +99,7 @@ var (
 			if !cmd.Flags().Changed("no-verify-jwt") {
 				noVerifyJWT = nil
 			}
-			return serve.Run(ctx, "", envFilePath, noVerifyJWT, importMapPath, afero.NewOsFs())
+			return serve.Run(ctx, envFilePath, noVerifyJWT, importMapPath, afero.NewOsFs())
 		},
 	}
 )
diff --git a/internal/functions/serve/serve.go b/internal/functions/serve/serve.go
index 37052c47..ccb05701 100644
--- a/internal/functions/serve/serve.go
+++ b/internal/functions/serve/serve.go
@@ -13,7 +13,6 @@ import (
 
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types/container"
-	"github.com/docker/docker/pkg/stdcopy"
 	"github.com/docker/go-connections/nat"
 	"github.com/joho/godotenv"
 	"github.com/spf13/afero"
@@ -34,179 +33,7 @@ var (
 	mainFuncEmbed string
 )
 
-// TODO: Remove deno relay code once we're confident w/ the stability of edge runtime.
-func Run(ctx context.Context, slug string, envFilePath string, noVerifyJWT *bool, importMapPath string, fsys afero.Fs) error {
-	if len(slug) == 0 {
-		return runServeAll(ctx, envFilePath, noVerifyJWT, importMapPath, fsys)
-	}
-
-	// 1. Sanity checks.
-	fmt.Fprintf(os.Stderr, "Serving functions with legacy %s... Run %s instead to use Edge Runtime.\n", utils.Yellow(utils.DenoRelayImage), utils.Aqua("functions serve"))
-	{
-		if err := utils.LoadConfigFS(fsys); err != nil {
-			return err
-		}
-		if err := utils.AssertSupabaseDbIsRunning(); err != nil {
-			return err
-		}
-		if err := utils.ValidateFunctionSlug(slug); err != nil {
-			return err
-		}
-		if envFilePath != "" {
-			if _, err := fsys.Stat(envFilePath); err != nil {
-				return fmt.Errorf("Failed to read env file: %w", err)
-			}
-		}
-		resolved, err := utils.AbsImportMapPath(importMapPath, slug, fsys)
-		if err != nil {
-			return err
-		}
-		importMapPath = resolved
-	}
-
-	// 2. Parse user defined env
-	userEnv, err := parseEnvFile(envFilePath, fsys)
-	if err != nil {
-		return err
-	}
-
-	// 3. Start relay.
-	{
-		_ = utils.Docker.ContainerRemove(ctx, utils.DenoRelayId, types.ContainerRemoveOptions{
-			RemoveVolumes: true,
-			Force:         true,
-		})
-
-		env := []string{
-			"JWT_SECRET=" + utils.Config.Auth.JwtSecret,
-			"DENO_ORIGIN=http://localhost:8000",
-		}
-		verifyJWTEnv := "VERIFY_JWT=true"
-		if noVerifyJWT == nil {
-			if functionConfig, ok := utils.Config.Functions[slug]; ok && !*functionConfig.VerifyJWT {
-				verifyJWTEnv = "VERIFY_JWT=false"
-			}
-		} else if *noVerifyJWT {
-			verifyJWTEnv = "VERIFY_JWT=false"
-		}
-		env = append(env, verifyJWTEnv)
-
-		cwd, err := os.Getwd()
-		if err != nil {
-			return err
-		}
-
-		binds := []string{filepath.Join(cwd, utils.FunctionsDir) + ":" + dockerFuncDirPath + ":rw,z"}
-		// If a import map path is explcitly provided, mount it as a separate file
-		if importMapPath != "" {
-			binds = append(binds, importMapPath+":"+dockerFlagImportMapPath+":ro,z")
-		}
-		if _, err := utils.DockerStart(
-			ctx,
-			container.Config{
-				Image: utils.DenoRelayImage,
-				Env:   append(env, userEnv...),
-			},
-			container.HostConfig{
-				Binds: binds,
-				// Allows containerized functions on Linux to reach host OS
-				ExtraHosts: []string{"host.docker.internal:host-gateway"},
-			},
-			utils.DenoRelayId,
-		); err != nil {
-			return err
-		}
-
-		go func() {
-			<-ctx.Done()
-			if ctx.Err() != nil {
-				utils.DockerRemove(utils.DenoRelayId)
-			}
-		}()
-	}
-
-	// 4. Start Function.
-	localFuncDir := filepath.Join(utils.FunctionsDir, slug)
-	localImportMapPath := filepath.Join(localFuncDir, "import_map.json")
-
-	// We assume the image is always Linux, so path separator must always be `/`.
-	// We can't use filepath.Join because it uses the path separator for the host system, which is `\` for Windows.
-	dockerFuncPath := dockerFuncDirPath + "/" + slug + "/index.ts"
-	dockerImportMapPath := dockerFuncDirPath + "/" + slug + "/import_map.json"
-
-	if importMapPath != "" {
-		localImportMapPath = importMapPath
-		dockerImportMapPath = dockerFlagImportMapPath
-	}
-
-	denoCacheCmd := []string{"deno", "cache"}
-	{
-		if _, err := fsys.Stat(localImportMapPath); err == nil {
-			denoCacheCmd = append(denoCacheCmd, "--import-map="+dockerImportMapPath)
-		} else if errors.Is(err, os.ErrNotExist) {
-			// skip
-		} else {
-			return fmt.Errorf("failed to check import_map.json for function %s: %w", slug, err)
-		}
-		denoCacheCmd = append(denoCacheCmd, dockerFuncPath)
-	}
-
-	fmt.Println("Starting " + utils.Bold(localFuncDir))
-	if _, err := utils.DockerExecOnce(ctx, utils.DenoRelayId, userEnv, denoCacheCmd); err != nil {
-		return err
-	}
-
-	{
-		fmt.Println("Serving " + utils.Bold(localFuncDir))
-
-		env := []string{
-			"SUPABASE_URL=http://" + utils.KongId + ":8000",
-			"SUPABASE_ANON_KEY=" + utils.Config.Auth.AnonKey,
-			"SUPABASE_SERVICE_ROLE_KEY=" + utils.Config.Auth.ServiceRoleKey,
-			"SUPABASE_DB_URL=postgresql://postgres:postgres@" + utils.DbId + ":5432/postgres",
-		}
-
-		denoRunCmd := []string{"deno", "run", "--no-check=remote", "--allow-all", "--watch", "--no-clear-screen", "--no-npm"}
-		{
-			if _, err := fsys.Stat(localImportMapPath); err == nil {
-				denoRunCmd = append(denoRunCmd, "--import-map="+dockerImportMapPath)
-			} else if errors.Is(err, os.ErrNotExist) {
-				// skip
-			} else {
-				return fmt.Errorf("failed to check index.ts for function %s: %w", slug, err)
-			}
-			denoRunCmd = append(denoRunCmd, dockerFuncPath)
-		}
-
-		exec, err := utils.Docker.ContainerExecCreate(
-			ctx,
-			utils.DenoRelayId,
-			types.ExecConfig{
-				Env:          append(env, userEnv...),
-				Cmd:          denoRunCmd,
-				AttachStderr: true,
-				AttachStdout: true,
-			},
-		)
-		if err != nil {
-			return err
-		}
-
-		resp, err := utils.Docker.ContainerExecAttach(ctx, exec.ID, types.ExecStartCheck{})
-		if err != nil {
-			return err
-		}
-
-		if _, err := stdcopy.StdCopy(os.Stdout, os.Stderr, resp.Reader); err != nil {
-			return err
-		}
-	}
-
-	fmt.Println("Stopped serving " + utils.Bold(localFuncDir))
-	return nil
-}
-
-func runServeAll(ctx context.Context, envFilePath string, noVerifyJWT *bool, importMapPath string, fsys afero.Fs) error {
+func Run(ctx context.Context, envFilePath string, noVerifyJWT *bool, importMapPath string, fsys afero.Fs) error {
 	// 1. Sanity checks.
 	if err := utils.LoadConfigFS(fsys); err != nil {
 		return err
@@ -215,7 +42,7 @@ func runServeAll(ctx context.Context, envFilePath string, noVerifyJWT *bool, imp
 		return err
 	}
 	// 2. Remove existing container.
-	_ = utils.Docker.ContainerRemove(ctx, utils.DenoRelayId, types.ContainerRemoveOptions{
+	_ = utils.Docker.ContainerRemove(ctx, utils.EdgeRuntimeId, types.ContainerRemoveOptions{
 		RemoveVolumes: true,
 		Force:         true,
 	})
@@ -224,7 +51,7 @@ func runServeAll(ctx context.Context, envFilePath string, noVerifyJWT *bool, imp
 	if err := ServeFunctions(ctx, envFilePath, noVerifyJWT, importMapPath, dbUrl, os.Stderr, fsys); err != nil {
 		return err
 	}
-	if err := utils.DockerStreamLogs(ctx, utils.DenoRelayId, os.Stdout, os.Stderr); err != nil {
+	if err := utils.DockerStreamLogs(ctx, utils.EdgeRuntimeId, os.Stdout, os.Stderr); err != nil {
 		return err
 	}
 	fmt.Println("Stopped serving " + utils.Bold(utils.FunctionsDir))
@@ -333,7 +160,7 @@ EOF
 			Binds:      binds,
 			ExtraHosts: []string{"host.docker.internal:host-gateway"},
 		}),
-		utils.DenoRelayId,
+		utils.EdgeRuntimeId,
 	)
 	return err
 }
diff --git a/internal/start/start.go b/internal/start/start.go
index 1cbf25c2..7128c32f 100644
--- a/internal/start/start.go
+++ b/internal/start/start.go
@@ -91,14 +91,14 @@ func Run(ctx context.Context, fsys afero.Fs, excludedContainers []string, ignore
 }
 
 type kongConfig struct {
-	GotrueId    string
-	RestId      string
-	RealtimeId  string
-	StorageId   string
-	PgmetaId    string
-	DenoRelayId string
-	LogflareId  string
-	ApiPort     uint
+	GotrueId      string
+	RestId        string
+	RealtimeId    string
+	StorageId     string
+	PgmetaId      string
+	EdgeRuntimeId string
+	LogflareId    string
+	ApiPort       uint
 }
 
 var (
@@ -108,15 +108,15 @@ var (
 )
 
 type vectorConfig struct {
-	ApiKey      string
-	LogflareId  string
-	KongId      string
-	GotrueId    string
-	RestId      string
-	RealtimeId  string
-	StorageId   string
-	DenoRelayId string
-	DbId        string
+	ApiKey        string
+	LogflareId    string
+	KongId        string
+	GotrueId      string
+	RestId        string
+	RealtimeId    string
+	StorageId     string
+	EdgeRuntimeId string
+	DbId          string
 }
 
 var (
@@ -154,15 +154,15 @@ func run(p utils.Program, ctx context.Context, fsys afero.Fs, excludedContainers
 	if utils.Config.Analytics.Enabled && !isContainerExcluded(utils.VectorImage, excluded) {
 		var vectorConfigBuf bytes.Buffer
 		if err := vectorConfigTemplate.Execute(&vectorConfigBuf, vectorConfig{
-			ApiKey:      utils.Config.Analytics.ApiKey,
-			LogflareId:  utils.LogflareId,
-			KongId:      utils.KongId,
-			GotrueId:    utils.GotrueId,
-			RestId:      utils.RestId,
-			RealtimeId:  utils.RealtimeId,
-			StorageId:   utils.StorageId,
-			DenoRelayId: utils.DenoRelayId,
-			DbId:        utils.DbId,
+			ApiKey:        utils.Config.Analytics.ApiKey,
+			LogflareId:    utils.LogflareId,
+			KongId:        utils.KongId,
+			GotrueId:      utils.GotrueId,
+			RestId:        utils.RestId,
+			RealtimeId:    utils.RealtimeId,
+			StorageId:     utils.StorageId,
+			EdgeRuntimeId: utils.EdgeRuntimeId,
+			DbId:          utils.DbId,
 		}); err != nil {
 			return err
 		}
@@ -271,14 +271,14 @@ EOF
 		var kongConfigBuf bytes.Buffer
 
 		if err := kongConfigTemplate.Execute(&kongConfigBuf, kongConfig{
-			GotrueId:    utils.GotrueId,
-			RestId:      utils.RestId,
-			RealtimeId:  utils.RealtimeId,
-			StorageId:   utils.StorageId,
-			PgmetaId:    utils.PgmetaId,
-			DenoRelayId: utils.DenoRelayId,
-			LogflareId:  utils.LogflareId,
-			ApiPort:     utils.Config.Api.Port,
+			GotrueId:      utils.GotrueId,
+			RestId:        utils.RestId,
+			RealtimeId:    utils.RealtimeId,
+			StorageId:     utils.StorageId,
+			PgmetaId:      utils.PgmetaId,
+			EdgeRuntimeId: utils.EdgeRuntimeId,
+			LogflareId:    utils.LogflareId,
+			ApiPort:       utils.Config.Api.Port,
 		}); err != nil {
 			return err
 		}
@@ -576,7 +576,7 @@ EOF
 		if err := serve.ServeFunctions(ctx, "", nil, "", dbUrl, w, fsys); err != nil {
 			return err
 		}
-		started = append(started, utils.DenoRelayId)
+		started = append(started, utils.EdgeRuntimeId)
 	}
 
 	// Start pg-meta.
diff --git a/internal/start/templates/kong.yml b/internal/start/templates/kong.yml
index f89b4b7d..2fb98cca 100644
--- a/internal/start/templates/kong.yml
+++ b/internal/start/templates/kong.yml
@@ -99,8 +99,8 @@ services:
         paths:
           - /pg/
   - name: functions-v1
-    _comment: "Functions: /functions/v1/* -> http://deno-relay:8081/*"
-    url: http://{{ .DenoRelayId }}:8081/
+    _comment: "Functions: /functions/v1/* -> http://edge-runtime:8081/*"
+    url: http://{{ .EdgeRuntimeId }}:8081/
     routes:
       - name: functions-v1-all
         strip_path: true
diff --git a/internal/start/templates/vector.yaml b/internal/start/templates/vector.yaml
index 3caa9116..752ce502 100644
--- a/internal/start/templates/vector.yaml
+++ b/internal/start/templates/vector.yaml
@@ -33,7 +33,7 @@ transforms:
       rest: '.appname == "{{ .RestId }}"'
       realtime: '.appname == "{{ .RealtimeId }}"'
       storage: '.appname == "{{ .StorageId }}"'
-      functions: '.appname == "{{ .DenoRelayId }}"'
+      functions: '.appname == "{{ .EdgeRuntimeId }}"'
       db: '.appname == "{{ .DbId }}"'
   # Kong logs only include api requests
   kong_logs:
diff --git a/internal/status/status.go b/internal/status/status.go
index 922a8075..d344067f 100644
--- a/internal/status/status.go
+++ b/internal/status/status.go
@@ -119,7 +119,7 @@ func IsServiceReady(ctx context.Context, container string) bool {
 	if container == utils.RestId {
 		return isPostgRESTHealthy(ctx)
 	}
-	if container == utils.DenoRelayId {
+	if container == utils.EdgeRuntimeId {
 		return isEdgeRuntimeHealthy(ctx)
 	}
 	return AssertContainerHealthy(ctx, container) == nil
diff --git a/internal/utils/config.go b/internal/utils/config.go
index f52d26b3..a0ca6381 100644
--- a/internal/utils/config.go
+++ b/internal/utils/config.go
@@ -18,24 +18,23 @@ import (
 )
 
 var (
-	DbImage    string
-	NetId      string
-	DbId       string
-	ConfigId   string
-	KongId     string
-	GotrueId   string
-	InbucketId string
-	RealtimeId string
-	RestId     string
-	StorageId  string
-	ImgProxyId string
-	DifferId   string
-	PgmetaId   string
-	StudioId   string
-	// TODO: Rename to EdgeRuntimeId once we deprecate the relay.
-	DenoRelayId string
-	LogflareId  string
-	VectorId    string
+	DbImage       string
+	NetId         string
+	DbId          string
+	ConfigId      string
+	KongId        string
+	GotrueId      string
+	InbucketId    string
+	RealtimeId    string
+	RestId        string
+	StorageId     string
+	ImgProxyId    string
+	DifferId      string
+	PgmetaId      string
+	StudioId      string
+	EdgeRuntimeId string
+	LogflareId    string
+	VectorId      string
 
 	InitialSchemaSql string
 	//go:embed templates/initial_schemas/13.sql
@@ -218,7 +217,7 @@ func LoadConfigFS(fsys afero.Fs) error {
 			DifferId = "supabase_differ_" + Config.ProjectId
 			PgmetaId = "supabase_pg_meta_" + Config.ProjectId
 			StudioId = "supabase_studio_" + Config.ProjectId
-			DenoRelayId = "supabase_deno_relay_" + Config.ProjectId
+			EdgeRuntimeId = "supabase_edge_runtime_" + Config.ProjectId
 			LogflareId = "supabase_analytics_" + Config.ProjectId
 			VectorId = "supabase_vector_" + Config.ProjectId
 		}
diff --git a/internal/utils/misc.go b/internal/utils/misc.go
index 37aebd5b..f6711e80 100644
--- a/internal/utils/misc.go
+++ b/internal/utils/misc.go
@@ -32,7 +32,6 @@ const (
 	MigraImage       = "djrobstep/migra:3.0.1621480950"
 	PgmetaImage      = "supabase/postgres-meta:v0.66.3"
 	StudioImage      = "supabase/studio:20230622-d8395eb"
-	DenoRelayImage   = "supabase/deno-relay:v1.6.0"
 	ImageProxyImage  = "darthsim/imgproxy:v3.8.0"
 	EdgeRuntimeImage = "supabase/edge-runtime:v1.5.2"
 	VectorImage      = "timberio/vector:0.28.1-alpine"
@@ -42,7 +41,7 @@ const (
 	RealtimeImage = "supabase/realtime:v2.10.1"
 	StorageImage  = "supabase/storage-api:v0.40.4"
 	LogflareImage = "supabase/logflare:1.0.2"
-	// Should be kept in-sync with DenoRelayImage
+	// Should be kept in-sync with EdgeRuntimeImage
 	DenoVersion = "1.30.3"
 )
 


Test patch:
diff --git a/internal/functions/serve/serve_test.go b/internal/functions/serve/serve_test.go
index 95a3a1b4..6dc80132 100644
--- a/internal/functions/serve/serve_test.go
+++ b/internal/functions/serve/serve_test.go
@@ -16,32 +16,6 @@ import (
 )
 
 func TestServeCommand(t *testing.T) {
-	t.Run("serves function locally", func(t *testing.T) {
-		// Setup in-memory fs
-		fsys := afero.NewMemMapFs()
-		require.NoError(t, utils.WriteConfig(fsys, false))
-		// Setup mock docker
-		require.NoError(t, apitest.MockDocker(utils.Docker))
-		defer gock.OffAll()
-		gock.New(utils.Docker.DaemonHost()).
-			Get("/v" + utils.Docker.ClientVersion() + "/containers").
-			Reply(http.StatusOK).
-			JSON(types.ContainerJSON{})
-		gock.New(utils.Docker.DaemonHost()).
-			Delete("/v" + utils.Docker.ClientVersion() + "/containers").
-			Reply(http.StatusOK)
-		utils.DenoRelayId = "test-deno"
-		apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.DenoRelayImage), utils.DenoRelayId)
-		gock.New(utils.Docker.DaemonHost()).
-			Post("/v" + utils.Docker.ClientVersion() + "/containers").
-			Reply(http.StatusServiceUnavailable)
-		// Run test
-		err := Run(context.Background(), "test-func", "", nil, "", fsys)
-		// Check error
-		assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
-		assert.Empty(t, apitest.ListUnmatchedRequests())
-	})
-
 	t.Run("serves all functions", func(t *testing.T) {
 		// Setup in-memory fs
 		fsys := afero.NewMemMapFs()
@@ -55,7 +29,7 @@ func TestServeCommand(t *testing.T) {
 			Get("/v" + utils.Docker.ClientVersion() + "/containers/supabase_db_test/json").
 			Reply(http.StatusOK).
 			JSON(types.ContainerJSON{})
-		containerId := "supabase_deno_relay_test"
+		containerId := "supabase_edge_runtime_test"
 		gock.New(utils.Docker.DaemonHost()).
 			Delete("/v" + utils.Docker.ClientVersion() + "/containers/" + containerId).
 			Reply(http.StatusOK)
@@ -63,7 +37,7 @@ func TestServeCommand(t *testing.T) {
 		require.NoError(t, apitest.MockDockerLogs(utils.Docker, containerId, "success"))
 		// Run test
 		noVerifyJWT := true
-		err := Run(context.Background(), "", ".env", &noVerifyJWT, "", fsys)
+		err := Run(context.Background(), ".env", &noVerifyJWT, "", fsys)
 		// Check error
 		assert.NoError(t, err)
 		assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -73,7 +47,7 @@ func TestServeCommand(t *testing.T) {
 		// Setup in-memory fs
 		fsys := afero.NewMemMapFs()
 		// Run test
-		err := Run(context.Background(), "", "", nil, "", fsys)
+		err := Run(context.Background(), "", nil, "", fsys)
 		// Check error
 		assert.ErrorContains(t, err, "open supabase/config.toml: file does not exist")
 	})
@@ -89,7 +63,7 @@ func TestServeCommand(t *testing.T) {
 			Get("/v" + utils.Docker.ClientVersion() + "/containers/supabase_db_test/json").
 			ReplyError(errors.New("network error"))
 		// Run test
-		err := Run(context.Background(), "", "", nil, "", fsys)
+		err := Run(context.Background(), "", nil, "", fsys)
 		// Check error
 		assert.ErrorIs(t, err, utils.ErrNotRunning)
 	})
@@ -106,7 +80,7 @@ func TestServeCommand(t *testing.T) {
 			Reply(http.StatusOK).
 			JSON(types.ContainerJSON{})
 		// Run test
-		err := Run(context.Background(), "", ".env", nil, "", fsys)
+		err := Run(context.Background(), ".env", nil, "", fsys)
 		// Check error
 		assert.ErrorContains(t, err, "open .env: file does not exist")
 	})
@@ -124,7 +98,7 @@ func TestServeCommand(t *testing.T) {
 			Reply(http.StatusOK).
 			JSON(types.ContainerJSON{})
 		// Run test
-		err := Run(context.Background(), "", ".env", nil, "import_map.json", fsys)
+		err := Run(context.Background(), ".env", nil, "import_map.json", fsys)
 		// Check error
 		assert.ErrorContains(t, err, "Failed to read import map")
 		assert.ErrorContains(t, err, "file does not exist")
diff --git a/internal/start/start_test.go b/internal/start/start_test.go
index 31b095fc..f5669422 100644
--- a/internal/start/start_test.go
+++ b/internal/start/start_test.go
@@ -177,8 +177,8 @@ func TestDatabaseStart(t *testing.T) {
 		apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.ImageProxyImage), utils.ImgProxyId)
 		utils.DifferId = "test-differ"
 		apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.DifferImage), utils.DifferId)
-		utils.DenoRelayId = "test-edge-runtime"
-		apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.EdgeRuntimeImage), utils.DenoRelayId)
+		utils.EdgeRuntimeId = "test-edge-runtime"
+		apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.EdgeRuntimeImage), utils.EdgeRuntimeId)
 		utils.PgmetaId = "test-pgmeta"
 		apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.PgmetaImage), utils.PgmetaId)
 		utils.StudioId = "test-studio"
@@ -191,7 +191,7 @@ func TestDatabaseStart(t *testing.T) {
 		// Setup health probes
 		started := []string{
 			utils.DbId, utils.KongId, utils.GotrueId, utils.InbucketId, utils.RealtimeId,
-			utils.StorageId, utils.ImgProxyId, utils.DenoRelayId, utils.PgmetaId, utils.StudioId,
+			utils.StorageId, utils.ImgProxyId, utils.EdgeRuntimeId, utils.PgmetaId, utils.StudioId,
 			utils.LogflareId, utils.RestId,
 		}
 		for _, container := range started {
diff --git a/internal/stop/stop_test.go b/internal/stop/stop_test.go
index 13d4d7b1..afc4811a 100644
--- a/internal/stop/stop_test.go
+++ b/internal/stop/stop_test.go
@@ -103,7 +103,7 @@ func TestStopServices(t *testing.T) {
 		utils.DbId = "test-db"
 		utils.ConfigId = "test-config"
 		utils.StorageId = "test-storage"
-		utils.DenoRelayId = "test-functions"
+		utils.EdgeRuntimeId = "test-functions"
 		// Setup mock docker
 		require.NoError(t, apitest.MockDocker(utils.Docker))
 		defer gock.OffAll()
@@ -125,7 +125,7 @@ func TestStopServices(t *testing.T) {
 			Delete("/v" + utils.Docker.ClientVersion() + "/volumes/" + utils.StorageId).
 			Reply(http.StatusNotFound)
 		gock.New(utils.Docker.DaemonHost()).
-			Delete("/v" + utils.Docker.ClientVersion() + "/volumes/" + utils.DenoRelayId).
+			Delete("/v" + utils.Docker.ClientVersion() + "/volumes/" + utils.EdgeRuntimeId).
 			Reply(http.StatusNotFound)
 		gock.New(utils.Docker.DaemonHost()).
 			Post("/v" + utils.Docker.ClientVersion() + "/networks/prune").