Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4ef520d
fix(docker): bump supabase/postgres from 17.6.1.029 to 17.6.1.032 in …
dependabot[bot] Oct 29, 2025
ac91981
fix(docker): bump the docker-minor group in /pkg/config/templates wit…
dependabot[bot] Oct 29, 2025
a87b8c8
chore(deps): bump github.com/getsentry/sentry-go from 0.36.1 to 0.36.…
dependabot[bot] Oct 29, 2025
891a5df
feat: add ssl certs for snap (#4380)
sweatybridge Oct 29, 2025
7356817
fix(docker): bump the docker-minor group in /pkg/config/templates wit…
dependabot[bot] Oct 30, 2025
55f2d68
fix(docker): bump supabase/postgres from 17.6.1.032 to 17.6.1.034 in …
dependabot[bot] Oct 30, 2025
11bd66d
fix: enable snapchat provider automatically for selected profile (#4382)
sweatybridge Oct 30, 2025
4be2ac3
fix: reset config url when skipping pooler (#4387)
sweatybridge Oct 30, 2025
0f0ea11
chore(deps): bump tar from 7.5.1 to 7.5.2 (#4389)
dependabot[bot] Oct 30, 2025
01f6d1c
fix(docker): bump the docker-minor group in /pkg/config/templates wit…
dependabot[bot] Oct 31, 2025
cda3afe
fix(docker): bump supabase/postgres from 17.6.1.034 to 17.6.1.036 in …
dependabot[bot] Nov 3, 2025
f711ee2
fix(docker): bump the docker-minor group in /pkg/config/templates wit…
dependabot[bot] Nov 3, 2025
df557dc
chore: sync API types from infrastructure (#4392)
kiwicopple Nov 3, 2025
677365d
chore: sync API types from infrastructure (#4401)
kiwicopple Nov 4, 2025
8b1d182
fix(docker): bump supabase/postgres from 17.6.1.036 to 17.6.1.038 in …
dependabot[bot] Nov 4, 2025
3491a2f
fix: drop schema specifier when enabling pgmq (#4391)
sweatybridge Nov 4, 2025
8f3bf1c
fix(docker): bump the docker-minor group in /pkg/config/templates wit…
dependabot[bot] Nov 4, 2025
2f211d7
feat: add configurable JWT issuer for local auth development (#4388)
cemalkilic Nov 5, 2025
47917e0
fix(docker): bump the docker-minor group in /pkg/config/templates wit…
dependabot[bot] Nov 5, 2025
4054f20
feat(auth): add support for managing auth notification templates (#4400)
issuedat Nov 5, 2025
4aa2ff2
Add auto-ANALYZE infos in "inspect db vacuum-stats"
jpargudo Nov 5, 2025
66e3ccd
Update vacuum_stats.go
jpargudo Nov 5, 2025
2317aba
Merge branch 'develop' into jpa
jpargudo Nov 5, 2025
949ce61
feat: add auto-ANALYZE infos in "inspect db vacuum-stats" (#4409)
jpargudo Nov 5, 2025
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/docker/docker v28.5.1+incompatible
github.com/docker/go-connections v0.6.0
github.com/fsnotify/fsnotify v1.9.0
github.com/getsentry/sentry-go v0.36.1
github.com/getsentry/sentry-go v0.36.2
github.com/go-errors/errors v1.5.1
github.com/go-git/go-git/v5 v5.16.3
github.com/go-playground/validator/v10 v10.28.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIp
github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE=
github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58=
github.com/getsentry/sentry-go v0.36.1 h1:kMJt0WWsxWATUxkvFgVBZdIeHSk/Oiv5P0jZ9e5m/Lw=
github.com/getsentry/sentry-go v0.36.1/go.mod h1:p5Im24mJBeruET8Q4bbcMfCQ+F+Iadc4L48tB1apo2c=
github.com/getsentry/sentry-go v0.36.2 h1:uhuxRPTrUy0dnSzTd0LrYXlBYygLkKY0hhlG5LXarzM=
github.com/getsentry/sentry-go v0.36.2/go.mod h1:p5Im24mJBeruET8Q4bbcMfCQ+F+Iadc4L48tB1apo2c=
github.com/ghostiam/protogetter v0.3.15 h1:1KF5sXel0HE48zh1/vn0Loiw25A9ApyseLzQuif1mLY=
github.com/ghostiam/protogetter v0.3.15/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA=
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
Expand Down
23 changes: 23 additions & 0 deletions internal/gen/types/templates/prod-ca-2025.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDxzCCAq+gAwIBAgIUeX+gpfmsRW9asFkRvjyXjHxbfgcwDQYJKoZIhvcNAQEL
BQAwazELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0RlbHdhcmUxEzARBgNVBAcMCk5l
dyBDYXN0bGUxFTATBgNVBAoMDFN1cGFiYXNlIEluYzEeMBwGA1UEAwwVU3VwYWJh
c2UgUm9vdCAyMDIxIENBMB4XDTI1MDkwMzA4MDEyNVoXDTM1MDkwMTA4MDEyNVow
azELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0RlbHdhcmUxEzARBgNVBAcMCk5ldyBD
YXN0bGUxFTATBgNVBAoMDFN1cGFiYXNlIEluYzEeMBwGA1UEAwwVU3VwYWJhc2Ug
Um9vdCAyMDIxIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5Ve7
i9UAmc7luUilELPtqzEk8nGHxg7nY0aCStr625M7+K4OPO6RUllTsHh47k1jWyzm
LXLlyYwCsYCjQp+3vn06H+F/HRUxBt6CK2B7bNng230exTunk0xFvfkX6YgHR7B3
1B7L25Rq3PhuRFPV4hnGYRam2XBZC4UNPqoAgrhV0HOYzXXAVoTr2yaBTMnB331Z
RwOmINh7eqTCk/JRZbb6vfZOhZRAVAe9AoRLoG8aKwmeoLGwlu0UuFx6z3E+6bmA
fSNa8Lx02GEoCdPLw9IRKUFq/SgBpQUKm44H1fDwTjH2CMM0N4p0mL/6wXnNeHvt
C40MmKZ0RcVmHE5wBwIDAQABo2MwYTAdBgNVHQ4EFgQUjvEE541toZcwtXQlZlcB
YOBRTnowHwYDVR0jBBgwFoAUjvEE541toZcwtXQlZlcBYOBRTnowDwYDVR0TAQH/
BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggEBACD5IcGP
XKvS9qg0CgEQPFqYavt5c7P+0xxFgiZe+xoG8fUw58yNeK2APtgGPRpxEOGfAlNx
z9HDt4gcyHEE00B3qAVDm49pqNxioFWzNqU2LGfM/HL1QmN6urR7hCOkVCJddvOc
FhFX4nZDuRfaBboDvS5HlK3Pzxddp9hvrJi2bemr8HLqYc3HzmVckgPGSLML6t+h
4LRCXSlQsDgQ1LZ4KHsl4cq7K51N6FOXQBLB5q4lMKhs0VUhCT8Pdsj12+84laCV
c22q6p2mdT9SaernCSRnWazXWisgpjv3H7Ex4S1DCYjJIwn3PUToGFv1r8YRN2/S
O19yVSxxCIf64Sg=
-----END CERTIFICATE-----
5 changes: 4 additions & 1 deletion internal/gen/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,17 @@ var (
caStaging string
//go:embed templates/prod-ca-2021.crt
caProd string
//go:embed templates/prod-ca-2025.crt
caSnap string
)

func GetRootCA(ctx context.Context, dbURL string, options ...func(*pgx.ConnConfig)) (string, error) {
// node-postgres does not support sslmode=prefer
if require, err := isRequireSSL(ctx, dbURL, options...); !require {
return "", err
}
return caStaging + caProd, nil
// Merge all certs to support --db-url flag
return caStaging + caProd + caSnap, nil
}

func isRequireSSL(ctx context.Context, dbUrl string, options ...func(*pgx.ConnConfig)) (bool, error) {
Expand Down
22 changes: 13 additions & 9 deletions internal/inspect/vacuum_stats/vacuum_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ import (
var VacuumStatsQuery string

type Result struct {
Name string
Last_vacuum string
Last_autovacuum string
Rowcount string
Dead_rowcount string
Autovacuum_threshold string
Expect_autovacuum string
Name string
Last_vacuum string
Last_autovacuum string
Last_analyze string
Last_autoanalyze string
Rowcount string
Dead_rowcount string
Autovacuum_threshold string
Autoanalyze_threshold string
Expect_autovacuum string
Expect_autoanalyze string
}

func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
Expand All @@ -43,10 +47,10 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}

table := "|Table|Last Vacuum|Last Auto Vacuum|Row count|Dead row count|Expect autovacuum?\n|-|-|-|-|-|-|\n"
table := "|Table|Last Vacuum|Last Auto Vacuum|Last Analyze|Last Auto Analyze|Row count|Dead row count|Expect autovacuum?|Expect autoanalyze?|\n|-|-|-|-|-|-|-|-|-|\n"
for _, r := range result {
rowcount := strings.Replace(r.Rowcount, "-1", "No stats", 1)
table += fmt.Sprintf("|`%s`|%s|%s|`%s`|`%s`|`%s`|\n", r.Name, r.Last_vacuum, r.Last_autovacuum, rowcount, r.Dead_rowcount, r.Expect_autovacuum)
table += fmt.Sprintf("|`%s`|%s|%s|%s|%s|`%s`|`%s`|`%s`|`%s`|\n", r.Name, r.Last_vacuum, r.Last_autovacuum, r.Last_analyze, r.Last_autoanalyze, rowcount, r.Dead_rowcount, r.Expect_autovacuum, r.Expect_autoanalyze)
}
return utils.RenderTable(table)
}
23 changes: 21 additions & 2 deletions internal/inspect/vacuum_stats/vacuum_stats.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,26 @@ WITH table_opts AS (
WHEN relopts LIKE '%autovacuum_vacuum_scale_factor%'
THEN substring(relopts, '.*autovacuum_vacuum_scale_factor=([0-9.]+).*')::real
ELSE current_setting('autovacuum_vacuum_scale_factor')::real
END AS autovacuum_vacuum_scale_factor
END AS autovacuum_vacuum_scale_factor,
CASE
WHEN relopts LIKE '%autovacuum_analyze_threshold%'
THEN substring(relopts, '.*autovacuum_analyze_threshold=([0-9.]+).*')::integer
ELSE current_setting('autovacuum_analyze_threshold')::integer
END AS autovacuum_analyze_threshold,
CASE
WHEN relopts LIKE '%autovacuum_analyze_scale_factor%'
THEN substring(relopts, '.*autovacuum_analyze_scale_factor=([0-9.]+).*')::real
ELSE current_setting('autovacuum_analyze_scale_factor')::real
END AS autovacuum_analyze_scale_factor
FROM
table_opts
)
SELECT
FORMAT('%I.%I', vacuum_settings.nspname, vacuum_settings.relname) AS name,
coalesce(to_char(psut.last_vacuum, 'YYYY-MM-DD HH24:MI'), '') AS last_vacuum,
coalesce(to_char(psut.last_autovacuum, 'YYYY-MM-DD HH24:MI'), '') AS last_autovacuum,
coalesce(to_char(psut.last_analyze, 'YYYY-MM-DD HH24:MI'), '') AS last_analyze,
coalesce(to_char(psut.last_autoanalyze, 'YYYY-MM-DD HH24:MI'), '') AS last_autoanalyze,
to_char(pg_class.reltuples, '9G999G999G999') AS rowcount,
to_char(psut.n_dead_tup, '9G999G999G999') AS dead_rowcount,
to_char(autovacuum_vacuum_threshold
Expand All @@ -31,7 +43,14 @@ SELECT
WHEN autovacuum_vacuum_threshold + (autovacuum_vacuum_scale_factor::numeric * pg_class.reltuples) < psut.n_dead_tup
THEN 'yes'
ELSE 'no'
END AS expect_autovacuum
END AS expect_autovacuum,
to_char(autovacuum_analyze_threshold
+ (autovacuum_analyze_scale_factor::numeric * pg_class.reltuples), '9G999G999G999') AS autoanalyze_threshold,
CASE
WHEN autovacuum_analyze_threshold + (autovacuum_analyze_scale_factor::numeric * pg_class.reltuples) < psut.n_dead_tup
THEN 'yes'
ELSE 'no'
END AS expect_autoanalyze
FROM
pg_stat_user_tables psut INNER JOIN pg_class ON psut.relid = pg_class.oid
INNER JOIN vacuum_settings ON pg_class.oid = vacuum_settings.oid
Expand Down
3 changes: 3 additions & 0 deletions internal/inspect/vacuum_stats/vacuum_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ func TestVacuumCommand(t *testing.T) {
Name: "test_schema.test_table",
Last_vacuum: "2021-01-01 00:00:00",
Last_autovacuum: "2021-01-01 00:00:00",
Last_analyze: "2021-01-01 00:00:00",
Last_autoanalyze: "2021-01-01 00:00:00",
Rowcount: "1000",
Dead_rowcount: "100",
Autovacuum_threshold: "100",
Expect_autovacuum: "yes",
Expect_autoanalyze: "yes",
})
// Run test
err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
Expand Down
1 change: 1 addition & 0 deletions internal/link/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func LinkServices(ctx context.Context, projectRef, serviceKey string, skipPooler
func() error { return linkStorage(ctx, projectRef) },
func() error {
if skipPooler {
utils.Config.Db.Pooler.ConnectionString = ""
return fsys.RemoveAll(utils.PoolerUrlPath)
}
return linkPooler(ctx, projectRef, fsys)
Expand Down
12 changes: 6 additions & 6 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ EOF
"GOTRUE_JWT_DEFAULT_GROUP_NAME=authenticated",
fmt.Sprintf("GOTRUE_JWT_EXP=%v", utils.Config.Auth.JwtExpiry),
"GOTRUE_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
"GOTRUE_JWT_ISSUER=" + utils.GetApiUrl("/auth/v1"),
"GOTRUE_JWT_ISSUER=" + utils.Config.Auth.JwtIssuer,

fmt.Sprintf("GOTRUE_EXTERNAL_EMAIL_ENABLED=%v", utils.Config.Auth.Email.EnableSignup),
fmt.Sprintf("GOTRUE_MAILER_SECURE_EMAIL_CHANGE_ENABLED=%v", utils.Config.Auth.Email.DoubleConfirmChanges),
Expand All @@ -494,10 +494,10 @@ EOF

fmt.Sprintf("GOTRUE_SMTP_MAX_FREQUENCY=%v", utils.Config.Auth.Email.MaxFrequency),

"GOTRUE_MAILER_URLPATHS_INVITE=" + utils.GetApiUrl("/auth/v1/verify"),
"GOTRUE_MAILER_URLPATHS_CONFIRMATION=" + utils.GetApiUrl("/auth/v1/verify"),
"GOTRUE_MAILER_URLPATHS_RECOVERY=" + utils.GetApiUrl("/auth/v1/verify"),
"GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE=" + utils.GetApiUrl("/auth/v1/verify"),
fmt.Sprintf("GOTRUE_MAILER_URLPATHS_INVITE=%s/verify", utils.Config.Auth.JwtIssuer),
fmt.Sprintf("GOTRUE_MAILER_URLPATHS_CONFIRMATION=%s/verify", utils.Config.Auth.JwtIssuer),
fmt.Sprintf("GOTRUE_MAILER_URLPATHS_RECOVERY=%s/verify", utils.Config.Auth.JwtIssuer),
fmt.Sprintf("GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE=%s/verify", utils.Config.Auth.JwtIssuer),
"GOTRUE_RATE_LIMIT_EMAIL_SENT=360000",

fmt.Sprintf("GOTRUE_EXTERNAL_PHONE_ENABLED=%v", utils.Config.Auth.Sms.EnableSignup),
Expand Down Expand Up @@ -699,7 +699,7 @@ EOF

redirectUri := config.RedirectUri
if redirectUri == "" {
redirectUri = utils.GetApiUrl("/auth/v1/callback")
redirectUri = utils.Config.Auth.JwtIssuer + "/callback"
}
env = append(env, fmt.Sprintf("GOTRUE_EXTERNAL_%s_REDIRECT_URI=%s", strings.ToUpper(name), redirectUri))

Expand Down
11 changes: 11 additions & 0 deletions internal/utils/flags/config_path.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package flags

import (
"strings"

"github.com/spf13/afero"
"github.com/supabase/cli/internal/utils"
)
Expand All @@ -11,5 +13,14 @@ func LoadConfig(fsys afero.Fs) error {
return err
}
utils.UpdateDockerIds()
// Apply profile specific overrides
if strings.EqualFold(utils.CurrentProfile.Name, "snap") {
ext := utils.Config.Auth.External["snapchat"]
ext.Enabled = true
ext.ClientId = utils.CurrentProfile.AuthClientID
// Any dummy value should work for local dev
ext.Secret.Value = utils.CurrentProfile.AuthClientID
utils.Config.Auth.External["snapchat"] = ext
}
return nil
}
4 changes: 3 additions & 1 deletion internal/utils/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ type Profile struct {
Name string `mapstructure:"name" validate:"required"`
APIURL string `mapstructure:"api_url" validate:"required,http_url"`
DashboardURL string `mapstructure:"dashboard_url" validate:"required,http_url"`
DocsURL string `mapstructure:"docs_url" validate:"omitempty,http_url"`
ProjectHost string `mapstructure:"project_host" validate:"required,hostname_rfc1123"`
PoolerHost string `mapstructure:"pooler_host" validate:"omitempty,hostname_rfc1123"`
DocsURL string `mapstructure:"docs_url" validate:"omitempty,http_url"`
AuthClientID string `mapstructure:"client_id" validate:"omitempty,uuid4"`
StudioImage string `mapstructure:"studio_image"`
}

Expand Down Expand Up @@ -48,6 +49,7 @@ var allProfiles = []Profile{{
DocsURL: "https://cloud.snap.com/docs",
ProjectHost: "snapcloud.dev",
PoolerHost: "snapcloud.co",
AuthClientID: "f7573b20-df47-48f1-b606-e8db4ec16252",
}}

var CurrentProfile Profile
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"bin-links": "^6.0.0",
"https-proxy-agent": "^7.0.2",
"node-fetch": "^3.3.2",
"tar": "7.5.1"
"tar": "7.5.2"
},
"release": {
"branches": [
Expand Down
16 changes: 10 additions & 6 deletions pkg/api/types.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading