Skip to content
Open
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
26 changes: 25 additions & 1 deletion packages/api/src/generated/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]),
Expand Down Expand Up @@ -2906,6 +2907,12 @@ export const V1GetPostgrestServiceConfigOutput = Schema.Struct({
}).check(Schema.isInt()),
Schema.Null,
]),
db_pool_acquisition_timeout: Schema.Union([

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep PostgREST replay bodies schema-valid

Fresh evidence after the earlier thread: in this target tree, apps/cli/src/legacy/commands/config/push/push.integration.test.ts still defines POSTGREST_DISABLED without db_pool_acquisition_timeout, and the recorded/scenario GET /postgrest fixtures under apps/cli-e2e/fixtures still omit it as well. Because packages/api/src/internal/client.ts decodes JSON responses through definition.outputSchema, making this key required makes those config-push integration/e2e replay paths fail schema decoding before reconciliation; update the mocks/fixtures or keep the response field optional during rollout.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep PostgREST replay bodies schema-valid

Fresh evidence in the tree for 6886dcf: apps/cli/src/legacy/commands/config/push/push.integration.test.ts still defines POSTGREST_DISABLED without db_pool_acquisition_timeout, and the recorded/scenario GET /postgrest fixtures under apps/cli-e2e/fixtures still omit it. Because packages/api/src/internal/client.ts decodes JSON responses through definition.outputSchema, making this key required causes those config-push integration/e2e replay paths to fail schema decoding before reconciliation; update the mocks/fixtures or keep the response field optional during rollout.

Useful? React with 👍 / 👎.

Schema.Number.annotate({
description: "If `null`, the value is automatically configured to 10.",
}).check(Schema.isInt()),
Schema.Null,
]),
Comment thread
jgoux marked this conversation as resolved.
Comment thread
jgoux marked this conversation as resolved.
Comment on lines +2910 to +2915

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep PostgREST replay bodies schema-valid

Fresh evidence after the earlier thread: in this target tree, apps/cli/src/legacy/commands/config/push/push.integration.test.ts still defines POSTGREST_DISABLED with only db_schema, db_extra_search_path, max_rows, and db_pool, and a repo-wide fixture scan found the recorded/scenario GET /postgrest replay bodies under apps/cli-e2e/fixtures still omit db_pool_acquisition_timeout. Because packages/api/src/internal/client.ts decodes JSON responses through definition.outputSchema, making this response key required causes those config-push integration/e2e replay paths to fail schema decoding before reconciliation; update the mocks/fixtures or keep the response field optional during rollout.

Useful? React with 👍 / 👎.

jwt_secret: Schema.optionalKey(Schema.String),
});
export const V1GetProfileInput = Schema.Struct({});
Expand Down Expand Up @@ -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,
Expand All @@ -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))
Expand Down Expand Up @@ -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,
Expand Down
32 changes: 30 additions & 2 deletions packages/api/src/generated/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -13357,6 +13368,11 @@
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"db_pool_acquisition_timeout": {
"type": "integer",
"minimum": 0,
"maximum": 60
}
},
"example": {
Expand All @@ -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",
Expand Down Expand Up @@ -20296,6 +20323,7 @@
"integrations.github_connections",
"dedicated_pooler",
"observability.dashboard_advanced_metrics",
"api.members.invitations",
"api.members.roles"
]
},
Expand Down
Loading