From b16b452cd8eb0fb6c8df9a6475cbf1dfea27365c Mon Sep 17 00:00:00 2001 From: jgoux <1443499+jgoux@users.noreply.github.com> Date: Fri, 3 Jul 2026 01:01:20 +0000 Subject: [PATCH 1/2] chore(api): sync Management API OpenAPI spec --- packages/api/src/generated/contracts.ts | 26 +++++++++++++++++++- packages/api/src/generated/openapi.json | 32 +++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/packages/api/src/generated/contracts.ts b/packages/api/src/generated/contracts.ts index 48a0fa2a9c..ce1f153aa9 100644 --- a/packages/api/src/generated/contracts.ts +++ b/packages/api/src/generated/contracts.ts @@ -2539,6 +2539,7 @@ export const V1GetOrganizationEntitlementsOutput = Schema.Struct({ "integrations.github_connections", "dedicated_pooler", "observability.dashboard_advanced_metrics", + "api.members.invitations", "api.members.roles", ]), type: Schema.Literals(["boolean", "numeric", "set"]), @@ -2906,6 +2907,12 @@ export const V1GetPostgrestServiceConfigOutput = Schema.Struct({ }).check(Schema.isInt()), Schema.Null, ]), + db_pool_acquisition_timeout: Schema.Union([ + Schema.Number.annotate({ + description: "If `null`, the value is automatically configured to 10.", + }).check(Schema.isInt()), + Schema.Null, + ]), jwt_secret: Schema.optionalKey(Schema.String), }); export const V1GetProfileInput = Schema.Struct({}); @@ -5789,6 +5796,11 @@ export const V1UpdatePostgrestServiceConfigInput = Schema.Struct({ .check(Schema.isGreaterThanOrEqualTo(0)) .check(Schema.isLessThanOrEqualTo(1000)), ), + db_pool_acquisition_timeout: Schema.optionalKey( + Schema.Number.check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)) + .check(Schema.isLessThanOrEqualTo(60)), + ), }); export const V1UpdatePostgrestServiceConfigOutput = Schema.Struct({ db_schema: Schema.String, @@ -5800,6 +5812,12 @@ export const V1UpdatePostgrestServiceConfigOutput = Schema.Struct({ }).check(Schema.isInt()), Schema.Null, ]), + db_pool_acquisition_timeout: Schema.Union([ + Schema.Number.annotate({ + description: "If `null`, the value is automatically configured to 10.", + }).check(Schema.isInt()), + Schema.Null, + ]), }); export const V1UpdateProjectApiKeyInput = Schema.Struct({ ref: Schema.String.check(Schema.isMinLength(20)) @@ -8792,7 +8810,13 @@ export const operationDefinitions = { requestBody: { kind: "json", contentType: "application/json", - fields: ["db_extra_search_path", "db_schema", "max_rows", "db_pool"], + fields: [ + "db_extra_search_path", + "db_schema", + "max_rows", + "db_pool", + "db_pool_acquisition_timeout", + ], }, response: { kind: "json" }, inputSchema: V1UpdatePostgrestServiceConfigInput, diff --git a/packages/api/src/generated/openapi.json b/packages/api/src/generated/openapi.json index 758084cf9b..0cc0c762a7 100644 --- a/packages/api/src/generated/openapi.json +++ b/packages/api/src/generated/openapi.json @@ -13333,11 +13333,22 @@ "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." }, + "db_pool_acquisition_timeout": { + "type": "integer", + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." + }, "jwt_secret": { "type": "string" } }, - "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] + "required": [ + "db_schema", + "max_rows", + "db_extra_search_path", + "db_pool", + "db_pool_acquisition_timeout" + ] }, "V1UpdatePostgrestConfigBody": { "type": "object", @@ -13357,6 +13368,11 @@ "type": "integer", "minimum": 0, "maximum": 1000 + }, + "db_pool_acquisition_timeout": { + "type": "integer", + "minimum": 0, + "maximum": 60 } }, "example": { @@ -13381,9 +13397,20 @@ "type": "integer", "nullable": true, "description": "If `null`, the value is automatically configured based on compute size." + }, + "db_pool_acquisition_timeout": { + "type": "integer", + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." } }, - "required": ["db_schema", "max_rows", "db_extra_search_path", "db_pool"] + "required": [ + "db_schema", + "max_rows", + "db_extra_search_path", + "db_pool", + "db_pool_acquisition_timeout" + ] }, "V1ProjectRefResponse": { "type": "object", @@ -20296,6 +20323,7 @@ "integrations.github_connections", "dedicated_pooler", "observability.dashboard_advanced_metrics", + "api.members.invitations", "api.members.roles" ] }, From de61996d778103ff9f7a43b14acb13a8a98496d8 Mon Sep 17 00:00:00 2001 From: Julien Goux Date: Thu, 2 Jul 2026 00:08:53 +0200 Subject: [PATCH 2/2] test(api): update PostgREST fixtures --- .../2.response.json | 1 + .../3.response.json | 1 + .../default.response.json | 1 + .../interactions.json | 1 + .../interactions.json | 1 + .../interactions.json | 1 + .../config/push/push.integration.test.ts | 2 ++ packages/cli-test-helpers/src/normalize.ts | 6 ++--- .../src/normalize.unit.test.ts | 23 +++++++++++++++++++ 9 files changed, 34 insertions(+), 3 deletions(-) diff --git a/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/2.response.json b/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/2.response.json index be253aaf01..ec12771c6e 100644 --- a/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/2.response.json +++ b/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/2.response.json @@ -12,6 +12,7 @@ "max_rows": 1000, "db_extra_search_path": "public, extensions", "db_pool": null, + "db_pool_acquisition_timeout": null, "jwt_secret": "EH9SYrAOLy4wUwRSts5kU5oZfiqFLy3+v+a1EAwFpKRbqxzPldJ5wMoiySHJiDmyWrMZXL5yK/9V7XkCtRdU0Q==" } } diff --git a/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/3.response.json b/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/3.response.json index 7d6f03351f..71b0aeac92 100644 --- a/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/3.response.json +++ b/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/3.response.json @@ -12,6 +12,7 @@ "max_rows": 1000, "db_extra_search_path": "public, extensions", "db_pool": null, + "db_pool_acquisition_timeout": null, "jwt_secret": "r0/2ujDmPfvUIbzLHvYV1Uz58kitPHk55HZt/wJ8ULYVsNKQ7huFluWj7LL+yi8nTv+yUVPEHFtsqCiHlR1lRw==" } } diff --git a/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/default.response.json b/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/default.response.json index 563ffe0590..abacd48f2b 100644 --- a/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/default.response.json +++ b/apps/cli-e2e/fixtures/recorded/GET_v1_projects___PROJECT_REF___postgrest/default.response.json @@ -12,6 +12,7 @@ "max_rows": 1000, "db_extra_search_path": "public, extensions", "db_pool": null, + "db_pool_acquisition_timeout": null, "jwt_secret": "wYu1Y5zcq5XMI/BHlkIl6p9LkFCuWMLyiAVVoKKcIKJkp2un+UF9KkNth/4YXd2nLagAXtJ0wq/DaixwsuUfww==" } } diff --git a/apps/cli-e2e/fixtures/scenarios/config-push-emits-http-trace-with-debug/interactions.json b/apps/cli-e2e/fixtures/scenarios/config-push-emits-http-trace-with-debug/interactions.json index 4341b8a12a..72a45c2466 100644 --- a/apps/cli-e2e/fixtures/scenarios/config-push-emits-http-trace-with-debug/interactions.json +++ b/apps/cli-e2e/fixtures/scenarios/config-push-emits-http-trace-with-debug/interactions.json @@ -691,6 +691,7 @@ "max_rows": 1000, "db_extra_search_path": "public, extensions", "db_pool": null, + "db_pool_acquisition_timeout": null, "jwt_secret": "EH9SYrAOLy4wUwRSts5kU5oZfiqFLy3+v+a1EAwFpKRbqxzPldJ5wMoiySHJiDmyWrMZXL5yK/9V7XkCtRdU0Q==" } } diff --git a/apps/cli-e2e/fixtures/scenarios/config-push-reconciles-every-section-against-the-remote/interactions.json b/apps/cli-e2e/fixtures/scenarios/config-push-reconciles-every-section-against-the-remote/interactions.json index b19751a226..71257560ea 100644 --- a/apps/cli-e2e/fixtures/scenarios/config-push-reconciles-every-section-against-the-remote/interactions.json +++ b/apps/cli-e2e/fixtures/scenarios/config-push-reconciles-every-section-against-the-remote/interactions.json @@ -691,6 +691,7 @@ "max_rows": 1000, "db_extra_search_path": "public, extensions", "db_pool": null, + "db_pool_acquisition_timeout": null, "jwt_secret": "EH9SYrAOLy4wUwRSts5kU5oZfiqFLy3+v+a1EAwFpKRbqxzPldJ5wMoiySHJiDmyWrMZXL5yK/9V7XkCtRdU0Q==" } } diff --git a/apps/cli-e2e/fixtures/scenarios/link-links-when-only-supabase-project-id-is-set-in-non-tty/interactions.json b/apps/cli-e2e/fixtures/scenarios/link-links-when-only-supabase-project-id-is-set-in-non-tty/interactions.json index 263250637c..a0d179bafa 100644 --- a/apps/cli-e2e/fixtures/scenarios/link-links-when-only-supabase-project-id-is-set-in-non-tty/interactions.json +++ b/apps/cli-e2e/fixtures/scenarios/link-links-when-only-supabase-project-id-is-set-in-non-tty/interactions.json @@ -236,6 +236,7 @@ "max_rows": 1000, "db_extra_search_path": "public, extensions", "db_pool": null, + "db_pool_acquisition_timeout": null, "jwt_secret": "wYu1Y5zcq5XMI/BHlkIl6p9LkFCuWMLyiAVVoKKcIKJkp2un+UF9KkNth/4YXd2nLagAXtJ0wq/DaixwsuUfww==" } } diff --git a/apps/cli/src/legacy/commands/config/push/push.integration.test.ts b/apps/cli/src/legacy/commands/config/push/push.integration.test.ts index d70a99bc20..02ccd9d77c 100644 --- a/apps/cli/src/legacy/commands/config/push/push.integration.test.ts +++ b/apps/cli/src/legacy/commands/config/push/push.integration.test.ts @@ -37,6 +37,7 @@ const POSTGREST_DISABLED = { db_extra_search_path: "", max_rows: 0, db_pool: null, + db_pool_acquisition_timeout: null, }; /** Routes mock HTTP responses by URL path so a single handler serves every endpoint. */ @@ -259,6 +260,7 @@ project_id = "abcdefghijklmnopqrst" db_extra_search_path: "public,extensions", max_rows: 1000, db_pool: null, + db_pool_acquisition_timeout: null, jwt_secret: "x", }, }, diff --git a/packages/cli-test-helpers/src/normalize.ts b/packages/cli-test-helpers/src/normalize.ts index e10e491ccd..fb9ac28687 100644 --- a/packages/cli-test-helpers/src/normalize.ts +++ b/packages/cli-test-helpers/src/normalize.ts @@ -83,8 +83,8 @@ export function normalize(output: string, options: NormalizeOptions = {}): strin .replace(/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*/g, "") // 7. Durations (e.g. 1.23s, 123ms, 42s) .replace(/\b\d+(?:\.\d+)?(?:ms|s)\b/g, "") - // 8. Unix absolute paths (/home/…, /Users/…, /tmp/…, /var/…, /opt/…, /usr/…) - .replace(/\/(?:home|Users|tmp|var|opt|usr)\/\S+/g, "") + // 8. Unix absolute paths (/home/…, /Users/…, /tmp/…, /private/tmp/…, /var/…, /private/var/…, /opt/…, /usr/…) + .replace(/\/(?:home|Users|tmp|private\/tmp|var|private\/var|opt|usr)\/\S+/g, "") // 9. Windows absolute paths (C:\…) .replace(/[A-Z]:\\\S+/g, "") // 10. Go stack frame addresses (0x1a2b3c4d) — vary per run due to ASLR @@ -102,7 +102,7 @@ export function normalize(output: string, options: NormalizeOptions = {}): strin // \t: // The TS port intentionally doesn't reconstruct these — strip the // frame block plus the trailing blank line so parity comparisons ignore them. - .replace(/(?:^ \(0xADDR\)\n\t[^\n]+\n)+\n?/gm, "") + .replace(/(?:^ \(0xADDR\)(?:\n\t[^\n]+)?\n)+\n?/gm, "") // 12c. A go-errors frame glued to a preceding prompt on the same line, e.g. // `Enter a new root key: (0xADDR)\n\t: …`. Rule 12b // only strips frames that begin at line start, so when a command writes diff --git a/packages/cli-test-helpers/src/normalize.unit.test.ts b/packages/cli-test-helpers/src/normalize.unit.test.ts index 2bfef356cd..c80c4bb641 100644 --- a/packages/cli-test-helpers/src/normalize.unit.test.ts +++ b/packages/cli-test-helpers/src/normalize.unit.test.ts @@ -57,7 +57,9 @@ describe("normalize", () => { expect(normalize("/Users/colum/supabase/cli/config.toml")).toBe(""); expect(normalize("/home/runner/work/config")).toBe(""); expect(normalize("/tmp/cli-e2e-profile-abc.yaml")).toBe(""); + expect(normalize("/private/tmp/cli-e2e-profile-abc.yaml")).toBe(""); expect(normalize("/var/log/app.log")).toBe(""); + expect(normalize("/private/var/folders/app.log")).toBe(""); }); it("normalizes Windows absolute paths", () => { @@ -74,6 +76,27 @@ describe("normalize", () => { expect(normalize(trace)).toBe(""); }); + it("strips github.com/go-errors stack frames from macOS temp paths", () => { + const trace = [ + "/private/var/folders/xy/cli/cmd.go (0x101234)", + "\trunCommand: return err", + "/private/tmp/supabase-cli/cmd/root.go (0x105678)", + "\tExecute: return err", + "", + "Cannot find project ref.", + ].join("\n"); + expect(normalize(trace)).toBe("Cannot find project ref."); + }); + + it("strips standalone github.com/go-errors stack frame lines", () => { + const trace = [ + "/private/var/folders/xy/cli/cmd.go (0x101234)", + "/private/tmp/supabase-cli/cmd/root.go (0x105678)", + "Cannot find project ref.", + ].join("\n"); + expect(normalize(trace)).toBe("Cannot find project ref."); + }); + it("normalizes Node/Bun stack trace lines", () => { const trace = [ "Error: something failed",