The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
refactor(replication): remove useless expire snapshot configuration (#46341)
Coenen Benjamin71775c368e84
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.schema.ts b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.schema.tsindex 41816878725..f2a663138fa 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.schema.ts+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.schema.ts@@ -43,7 +43,6 @@ export const DestinationPanelFormSchema = z.object({ducklakeS3UrlStyle: z.enum(['path', 'vhost']).optional(),ducklakeS3UseSsl: z.boolean().optional(),ducklakeMetadataSchema: z.string().optional(),- ducklakeExpireSnapshotsOlderThan: z.string().optional(),})export type DestinationPanelSchemaType = z.infer<typeof DestinationPanelFormSchema>diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.test.ts b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.test.tsindex 65458c9202d..571688989fa 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.test.ts+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.test.ts@@ -35,7 +35,6 @@ const baseDucklakeFormData = {ducklakeS3UrlStyle: 'path' as const,ducklakeS3UseSsl: true,ducklakeMetadataSchema: ' ducklake_metadata ',- ducklakeExpireSnapshotsOlderThan: ' 7 days ',}describe('DestinationForm.utils DuckLake', () => {@@ -46,7 +45,6 @@ describe('DestinationForm.utils DuckLake', () => {data: {...baseDucklakeFormData,ducklakeMetadataSchema: ' ',- ducklakeExpireSnapshotsOlderThan: ' ',},})@@ -62,7 +60,6 @@ describe('DestinationForm.utils DuckLake', () => {s3UrlStyle: 'path',s3UseSsl: true,metadataSchema: undefined,- expireSnapshotsOlderThan: undefined,},})})@@ -91,7 +88,6 @@ describe('DestinationForm.utils DuckLake', () => {s3UrlStyle: 'path',s3UseSsl: true,metadataSchema: 'ducklake_metadata',- expireSnapshotsOlderThan: '7 days',},})expect(createS3AccessKey).not.toHaveBeenCalled()diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.ts b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.tsindex a5827e6c959..70b3bd5be8e 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.ts+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.ts@@ -176,7 +176,6 @@ export const buildDestinationConfigForValidation = ({s3UrlStyle: data.ducklakeS3UrlStyle,s3UseSsl: data.ducklakeS3UseSsl,metadataSchema: normalizeOptionalString(data.ducklakeMetadataSchema),- expireSnapshotsOlderThan: normalizeOptionalString(data.ducklakeExpireSnapshotsOlderThan),},}} else {@@ -255,7 +254,6 @@ export const buildDestinationConfig = async ({s3UrlStyle: data.ducklakeS3UrlStyle,s3UseSsl: data.ducklakeS3UseSsl,metadataSchema: normalizeOptionalString(data.ducklakeMetadataSchema),- expireSnapshotsOlderThan: normalizeOptionalString(data.ducklakeExpireSnapshotsOlderThan),}destinationConfig = { ducklake: ducklakeConfig }}diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsxindex 0638af48351..3c4bf58612a 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx@@ -318,9 +318,9 @@ export const DuckLakeFields = ({ form }: { form: UseFormReturn<DestinationPanelS</div><div className="flex flex-col gap-y-1">- <p className="text-sm font-medium text-foreground">Maintenance</p>+ <p className="text-sm font-medium text-foreground">Metadata</p><p className="text-sm text-foreground-light">- Optional settings for DuckLake metadata tables and snapshot cleanup.+ Optional schema setting for DuckLake metadata tables.</p></div>@@ -340,22 +340,6 @@ export const DuckLakeFields = ({ form }: { form: UseFormReturn<DestinationPanelS</FormItemLayout>)}/>-- <FormField- control={form.control}- name="ducklakeExpireSnapshotsOlderThan"- render={({ field }) => (- <FormItemLayout- layout="horizontal"- label="Expire snapshots older than"- description="Optional snapshot retention interval, for example `7 days`"- >- <FormControl>- <Input {...field} placeholder="7 days" value={field.value ?? ''} />- </FormControl>- </FormItemLayout>- )}- /></div></div>)diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsxindex e9997898784..7d2c9d476e7 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx@@ -84,7 +84,6 @@ type DucklakeApiConfig = {s3_url_style?: 'path' | 'vhost's3_use_ssl?: booleanmetadata_schema?: string- expire_snapshots_older_than?: string}export const DestinationForm = ({@@ -237,7 +236,6 @@ export const DestinationForm = ({ducklakeS3UrlStyle: ducklakeConfig?.s3_url_style ?? 'path',ducklakeS3UseSsl: ducklakeConfig?.s3_use_ssl ?? true,ducklakeMetadataSchema: ducklakeConfig?.metadata_schema ?? 'ducklake',- ducklakeExpireSnapshotsOlderThan: ducklakeConfig?.expire_snapshots_older_than ?? '',}}, [destinationData, pipelineData, catalogToken, projectSettings])diff --git a/apps/studio/data/replication/create-destination-pipeline-mutation.ts b/apps/studio/data/replication/create-destination-pipeline-mutation.tsindex 1374f93730f..c9efbc4d158 100644--- a/apps/studio/data/replication/create-destination-pipeline-mutation.ts+++ b/apps/studio/data/replication/create-destination-pipeline-mutation.ts@@ -46,7 +46,6 @@ export type DucklakeDestinationConfig = {s3UrlStyle?: 'path' | 'vhost's3UseSsl?: booleanmetadataSchema?: string- expireSnapshotsOlderThan?: string}export type BatchConfig = {@@ -137,7 +136,6 @@ async function createDestinationPipeline(s3UrlStyle,s3UseSsl,metadataSchema,- expireSnapshotsOlderThan,} = destinationConfig.ducklakedestination_config = {@@ -152,7 +150,6 @@ async function createDestinationPipeline(s3_url_style: s3UrlStyle,s3_use_ssl: s3UseSsl,metadata_schema: metadataSchema,- expire_snapshots_older_than: expireSnapshotsOlderThan,},} as unknown as components['schemas']['CreateReplicationDestinationPipelineBody']['destination_config']} else {diff --git a/apps/studio/data/replication/update-destination-pipeline-mutation.ts b/apps/studio/data/replication/update-destination-pipeline-mutation.tsindex 0c70208b437..da11926d086 100644--- a/apps/studio/data/replication/update-destination-pipeline-mutation.ts+++ b/apps/studio/data/replication/update-destination-pipeline-mutation.ts@@ -93,7 +93,6 @@ async function updateDestinationPipeline(s3UrlStyle,s3UseSsl,metadataSchema,- expireSnapshotsOlderThan,} = destinationConfig.ducklakedestination_config = {ducklake: {@@ -107,7 +106,6 @@ async function updateDestinationPipeline(s3_url_style: s3UrlStyle,s3_use_ssl: s3UseSsl,metadata_schema: metadataSchema,- expire_snapshots_older_than: expireSnapshotsOlderThan,},} as unknown as components['schemas']['UpdateReplicationDestinationPipelineBody']['destination_config']} else {diff --git a/apps/studio/data/replication/validate-destination-mutation.ts b/apps/studio/data/replication/validate-destination-mutation.tsindex 5ad9da83112..908a9849e9d 100644--- a/apps/studio/data/replication/validate-destination-mutation.ts+++ b/apps/studio/data/replication/validate-destination-mutation.ts@@ -71,7 +71,6 @@ async function validateDestination(s3UrlStyle,s3UseSsl,metadataSchema,- expireSnapshotsOlderThan,} = destinationConfig.ducklakeconfig = {@@ -86,7 +85,6 @@ async function validateDestination(s3_url_style: s3UrlStyle,s3_use_ssl: s3UseSsl,metadata_schema: metadataSchema,- expire_snapshots_older_than: expireSnapshotsOlderThan,},} as unknown as components['schemas']['ValidateReplicationDestinationBody']['config']} else {diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.tsindex 187a5310bf5..d67499e142f 100644--- a/packages/api-types/types/platform.d.ts+++ b/packages/api-types/types/platform.d.ts@@ -5732,11 +5732,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake@@ -5870,11 +5865,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake@@ -9393,11 +9383,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake@@ -9543,11 +9528,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake@@ -11384,11 +11364,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake@@ -11522,11 +11497,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake@@ -12071,11 +12041,6 @@ export interface components {* @example s3://<bucket-name>/*/data_path: string- /**- * @description DuckLake snapshot retention interval (format: https://duckdb.org/docs/current/sql/data_types/interval)- * @example 7 days- */- expire_snapshots_older_than?: string/*** @description Schema used for DuckLake metadata tables stored in PostgreSQL* @default ducklake