Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod deploy #2943

Merged
merged 2 commits into from
Dec 4, 2024
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
23 changes: 3 additions & 20 deletions cmd/branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"os"
"sort"

"github.com/go-errors/errors"
"github.com/spf13/afero"
Expand All @@ -29,7 +28,7 @@ var (
}

branchRegion = utils.EnumFlag{
Allowed: flyRegions(),
Allowed: awsRegions(),
}
persistent bool

Expand Down Expand Up @@ -96,9 +95,8 @@ var (
string(api.BranchResponseStatusFUNCTIONSFAILED),
},
}
branchName string
gitBranch string
resetOnPush bool
branchName string
gitBranch string

branchUpdateCmd = &cobra.Command{
Use: "update [branch-id]",
Expand All @@ -114,9 +112,6 @@ var (
if cmdFlags.Changed("git-branch") {
body.GitBranch = &gitBranch
}
if cmdFlags.Changed("reset-on-push") {
body.ResetOnPush = &resetOnPush
}
if cmdFlags.Changed("persistent") {
body.Persistent = &persistent
}
Expand Down Expand Up @@ -176,7 +171,6 @@ func init() {
updateFlags := branchUpdateCmd.Flags()
updateFlags.StringVar(&branchName, "name", "", "Rename the preview branch.")
updateFlags.StringVar(&gitBranch, "git-branch", "", "Change the associated git branch.")
updateFlags.BoolVar(&resetOnPush, "reset-on-push", false, "Reset the preview branch on git push.")
updateFlags.BoolVar(&persistent, "persistent", false, "Switch between ephemeral and persistent branch.")
updateFlags.Var(&branchStatus, "status", "Override the current branch status.")
branchesCmd.AddCommand(branchUpdateCmd)
Expand All @@ -185,17 +179,6 @@ func init() {
rootCmd.AddCommand(branchesCmd)
}

func flyRegions() []string {
result := make([]string, len(utils.FlyRegions))
i := 0
for k := range utils.FlyRegions {
result[i] = k
i++
}
sort.Strings(result)
return result
}

func promptBranchId(ctx context.Context, ref string) error {
resp, err := utils.GetSupabase().V1ListAllBranchesWithResponse(ctx, ref)
if err != nil {
Expand Down
35 changes: 0 additions & 35 deletions internal/utils/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,41 +217,6 @@ var RegionMap = map[string]string{
"us-west-2": "West US (Oregon)",
}

var FlyRegions = map[string]string{
"ams": "Amsterdam, Netherlands",
"arn": "Stockholm, Sweden",
"bog": "Bogotá, Colombia",
"bos": "Boston, Massachusetts (US)",
"cdg": "Paris, France",
"den": "Denver, Colorado (US)",
"dfw": "Dallas, Texas (US",
"ewr": "Secaucus, NJ (US)",
"fra": "Frankfurt, Germany",
"gdl": "Guadalajara, Mexico",
"gig": "Rio de Janeiro, Brazil",
"gru": "Sao Paulo, Brazil",
"hkg": "Hong Kong, Hong Kong",
"iad": "Ashburn, Virginia (US",
"jnb": "Johannesburg, South Africa",
"lax": "Los Angeles, California (US",
"lhr": "London, United Kingdom",
"maa": "Chennai (Madras), India",
"mad": "Madrid, Spain",
"mia": "Miami, Florida (US)",
"nrt": "Tokyo, Japan",
"ord": "Chicago, Illinois (US",
"otp": "Bucharest, Romania",
"qro": "Querétaro, Mexico",
"scl": "Santiago, Chile",
"sea": "Seattle, Washington (US",
"sin": "Singapore, Singapore",
"sjc": "San Jose, California (US",
"syd": "Sydney, Australia",
"waw": "Warsaw, Poland",
"yul": "Montreal, Canada",
"yyz": "Toronto, Canada",
}

func GetSupabaseAPIHost() string {
apiHost := viper.GetString("INTERNAL_API_HOST")
if apiHost == "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
inbucketImage = "inbucket/inbucket:3.0.3"
postgrestImage = "postgrest/postgrest:v12.2.0"
pgmetaImage = "supabase/postgres-meta:v0.84.2"
studioImage = "supabase/studio:20241106-f29003e"
studioImage = "supabase/studio:20241202-71e5240"
imageProxyImage = "darthsim/imgproxy:v3.8.0"
edgeRuntimeImage = "supabase/edge-runtime:v1.65.3"
vectorImage = "timberio/vector:0.28.1-alpine"
Expand Down
Loading