Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat(etl): Add integration with new validation endpoint (#41731)

Riccardo Busettid795240928a0
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
index f3260a82d46..2fd126068ff 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
@@ -10,6 +10,7 @@ import {
FormControl_Shadcn_,
FormField_Shadcn_,
Input_Shadcn_,
+ PrePostTab,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { DestinationType } from '../DestinationPanel.types'
@@ -47,18 +48,20 @@ export const AdvancedSettings = ({
name="maxFillMs"
render={({ field }) => (
<FormItemLayout
- label="Batch wait time (milliseconds)"
+ label="Batch wait time"
layout="horizontal"
description="How long to wait for more changes before sending. Shorter times mean more real-time updates but higher overhead."
>
<FormControl_Shadcn_>
- <Input_Shadcn_
- {...field}
- type="number"
- value={field.value ?? ''}
- onChange={handleNumberChange(field)}
- placeholder="e.g., 5000 (5 seconds)"
- />
+ <PrePostTab postTab="milliseconds">
+ <Input_Shadcn_
+ {...field}
+ type="number"
+ value={field.value ?? ''}
+ onChange={handleNumberChange(field)}
+ placeholder="Default: 10000 (10 seconds)"
+ />
+ </PrePostTab>
</FormControl_Shadcn_>
</FormItemLayout>
)}
@@ -73,21 +76,23 @@ export const AdvancedSettings = ({
<FormItemLayout
label={
<div className="flex flex-col gap-y-2">
- <span>Maximum staleness (minutes)</span>
+ <span>Maximum staleness</span>
<Badge className="w-min">BigQuery only</Badge>
</div>
}
layout="horizontal"
- description="Maximum age of cached data before BigQuery reads from base tables at query time. Lower values ensure fresher results but may increase query costs."
+ description="Maximum age of cached data before BigQuery reads from base tables at query time. Lower values ensure fresher results but may increase query costs. Leave empty for no staleness limit."
>
<FormControl_Shadcn_>
- <Input_Shadcn_
- {...field}
- type="number"
- value={field.value ?? ''}
- onChange={handleNumberChange(field)}
- placeholder="e.g. 60 (1 hour)"
- />
+ <PrePostTab postTab="minutes">
+ <Input_Shadcn_
+ {...field}
+ type="number"
+ value={field.value ?? ''}
+ onChange={handleNumberChange(field)}
+ placeholder="Default: none"
+ />
+ </PrePostTab>
</FormControl_Shadcn_>
</FormItemLayout>
)}
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.ts
new file mode 100644
index 00000000000..77a95a7cc4d
--- /dev/null
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationForm.utils.ts
@@ -0,0 +1,56 @@
+import z from 'zod'
+
+import { DestinationType } from '../DestinationPanel.types'
+import { CREATE_NEW_KEY, CREATE_NEW_NAMESPACE } from './DestinationForm.constants'
+import { DestinationPanelFormSchema } from './DestinationForm.schema'
+
+// Helper function to build destination config for validation
+export const buildDestinationConfigForValidation = ({
+ projectRef,
+ selectedType,
+ data,
+}: {
+ projectRef?: string
+ selectedType: DestinationType
+ data: z.infer<typeof DestinationPanelFormSchema>
+}) => {
+ if (!projectRef) throw new Error('Project ref is required')
+
+ if (selectedType === 'BigQuery') {
+ return {
+ bigQuery: {
+ projectId: data.projectId ?? '',
+ datasetId: data.datasetId ?? '',
+ serviceAccountKey: data.serviceAccountKey ?? '',
+ ...(data.maxStalenessMins !== undefined ? { maxStalenessMins: data.maxStalenessMins } : {}),
+ },
+ }
+ } else if (selectedType === 'Analytics Bucket') {
+ // For validation, use the namespace as-is (even if it's CREATE_NEW_NAMESPACE)
+ // The actual creation will happen later in submitPipeline
+ const validationNamespace =
+ data.namespace === CREATE_NEW_NAMESPACE ? data.newNamespaceName : data.namespace
+
+ // For validation purposes, if CREATE_NEW_KEY is selected, we skip S3 key validation
+ // The actual key creation will happen later in submitPipeline
+ // We'll use placeholder values for validation
+ const s3Keys =
+ data.s3AccessKeyId === CREATE_NEW_KEY
+ ? { accessKey: 'placeholder', secretKey: 'placeholder' }
+ : { accessKey: data.s3AccessKeyId ?? '', secretKey: data.s3SecretAccessKey ?? '' }
+
+ return {
+ iceberg: {
+ projectRef,
+ warehouseName: data.warehouseName ?? '',
+ namespace: validationNamespace,
+ catalogToken: data.catalogToken ?? '',
+ s3AccessKeyId: s3Keys.accessKey,
+ s3SecretAccessKey: s3Keys.secretKey,
+ s3Region: data.s3Region ?? '',
+ },
+ }
+ } else {
+ throw new Error('Invalid destination type')
+ }
+}
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx
index 9b1003c52cf..417596f7b24 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx
@@ -32,16 +32,15 @@ import type { DestinationPanelSchemaType } from './DestinationForm.schema'
export const BigQueryFields = ({ form }: { form: UseFormReturn<DestinationPanelSchemaType> }) => {
return (
- <div className="flex flex-col gap-y-6">
- <p className="text-sm font-medium text-foreground px-5 pt-5">BigQuery settings</p>
- <div className="flex flex-col gap-y-4 pb-5">
+ <div className="flex flex-col gap-y-6 p-5">
+ <p className="text-sm font-medium text-foreground">BigQuery settings</p>
+ <div className="flex flex-col gap-y-4">
<FormField_Shadcn_
control={form.control}
name="projectId"
render={({ field }) => (
<FormItemLayout
layout="horizontal"
- className="px-5"
label="Project ID"
description="The Google Cloud project ID where data will be sent"
>
@@ -59,7 +58,6 @@ export const BigQueryFields = ({ form }: { form: UseFormReturn<DestinationPanelS
<FormItemLayout
label="Dataset ID"
layout="horizontal"
- className="px-5"
description="The BigQuery dataset where replicated tables will be created"
>
<FormControl_Shadcn_>
@@ -75,7 +73,6 @@ export const BigQueryFields = ({ form }: { form: UseFormReturn<DestinationPanelS
render={({ field }) => (
<FormItemLayout
layout="horizontal"
- className="px-5"
label="Service Account Key"
description="Service account credentials JSON for authenticating with BigQuery"
>
@@ -158,10 +155,10 @@ export const AnalyticsBucketFields = ({
)
return (
- <div className="flex flex-col gap-y-6">
- <p className="text-sm font-medium text-foreground px-5 pt-5">Analytics Bucket settings</p>
+ <div className="flex flex-col gap-y-6 p-5">
+ <p className="text-sm font-medium text-foreground">Analytics Bucket settings</p>
- <div className="flex flex-col gap-y-4 pb-5">
+ <div className="flex flex-col gap-y-4">
<FormField_Shadcn_
control={form.control}
name="warehouseName"
@@ -169,7 +166,6 @@ export const AnalyticsBucketFields = ({
<FormItemLayout
label="Bucket"
layout="horizontal"
- className="px-5"
description="The Analytics Bucket where data will be stored"
>
{isLoadingBuckets ? (
@@ -243,7 +239,6 @@ export const AnalyticsBucketFields = ({
<FormItemLayout
label="Namespace"
layout="horizontal"
- className="px-5"
description="The namespace within the bucket where tables will be organized"
>
{isLoadingNamespaces && canSelectNamespace ? (
@@ -317,7 +312,6 @@ export const AnalyticsBucketFields = ({
<FormItemLayout
label="New Namespace Name"
layout="horizontal"
- className="px-5"
description="A unique name for the new namespace"
>
<FormControl_Shadcn_>
@@ -335,7 +329,6 @@ export const AnalyticsBucketFields = ({
<FormItemLayout
layout="horizontal"
label="Catalog Token"
- className="px-5"
description={
<>
Automatically retrieved from your project's{' '}
@@ -401,7 +394,6 @@ export const AnalyticsBucketFields = ({
)}
</div>
}
- className="px-5"
>
{isLoadingKeys ? (
<Button
@@ -462,7 +454,7 @@ export const AnalyticsBucketFields = ({
<FormItemLayout
layout="horizontal"
label="S3 Secret Access Key"
- className="relative px-5"
+ className="relative"
description="The secret key corresponding to your selected access key ID"
>
<FormControl_Shadcn_>
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationSelection.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationSelection.tsx
index 2df4f0e2de9..5f644dc2b8e 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationSelection.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationSelection.tsx
@@ -2,10 +2,7 @@ import { useMemo } from 'react'
import type { UseFormReturn } from 'react-hook-form'
import { useParams } from 'common'
-import { InlineLink } from 'components/ui/InlineLink'
-import { useCheckPrimaryKeysExists } from 'data/database/primary-keys-exists-query'
import { useReplicationPublicationsQuery } from 'data/replication/publications-query'
-import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { FormControl_Shadcn_, FormField_Shadcn_ } from 'ui'
import { Admonition } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -26,7 +23,6 @@ export const PublicationSelection = ({
onSelectNewPublication,
}: PublicationSelectionProps) => {
const { ref: projectRef } = useParams()
- const { data: project } = useSelectedProjectQuery()
const { publicationName } = form.watch()
const {
@@ -36,20 +32,9 @@ export const PublicationSelection = ({
} = useReplicationPublicationsQuery({ projectRef, sourceId })
const publicationNames = useMemo(() => publications?.map((pub) => pub.name) ?? [], [publications])
- const selectedPublication = publications.find((pub) => pub.name === publicationName)
const isSelectedPublicationMissing =
isSuccessPublications && !!publicationName && !publicationNames.includes(publicationName)
- const { data: checkPrimaryKeysExistsData, isPending: isLoadingCheck } = useCheckPrimaryKeysExists(
- {
- projectRef: project?.ref,
- connectionString: project?.connectionString,
- tables: selectedPublication?.tables ?? [],
- },
- { enabled: visible && !!selectedPublication }
- )
- const hasTablesWithNoPrimaryKeys = (checkPrimaryKeysExistsData?.offendingTables ?? []).length > 0
-
return (
<FormField_Shadcn_
control={form.control}
@@ -58,45 +43,24 @@ export const PublicationSelection = ({
<FormItemLayout
layout="horizontal"
label="Publication"
- description="Choose which tables to replicate to this destination"
+ description="Tables in the selected publication will be replicated to this destination"
>
<FormControl_Shadcn_>
<PublicationsComboBox
- publications={publicationNames}
+ publications={publications}
isLoadingPublications={isLoadingPublications}
- isLoadingCheck={!!selectedPublication && isLoadingCheck}
field={field}
onNewPublicationClick={() => onSelectNewPublication()}
/>
</FormControl_Shadcn_>
- {isSelectedPublicationMissing ? (
+ {isSelectedPublicationMissing && (
<Admonition type="warning" className="mt-2">
<p className="!leading-normal">
The publication <strong className="text-foreground">{publicationName}</strong> was
not found, it may have been renamed or deleted, please select another one.
</p>
</Admonition>
- ) : hasTablesWithNoPrimaryKeys ? (
- <Admonition type="warning" className="mt-2">
- <p className="!leading-normal">
- Replication requires every table in the publication to have a primary key to work,
- which these tables are missing:
- </p>
- <ul className="list-disc pl-6 mb-2">
- {(checkPrimaryKeysExistsData?.offendingTables ?? []).map((x) => {
- const value = `${x.schema}.${x.name}`
- return (
- <li key={value} className="!leading-normal">
- <InlineLink href={`/project/${projectRef}/editor/${x.id}`}>
- {value}
- </InlineLink>
- </li>
- )
- })}
- </ul>
- <p className="!leading-normal">Ensure that these tables have primary keys first.</p>
- </Admonition>
- ) : null}
+ )}
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx
index 0e021a1d6b1..0dba1a48484 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx
@@ -1,7 +1,10 @@
import { Check, ChevronsUpDown, Loader2, Plus } from 'lucide-react'
import { useEffect, useState } from 'react'
import { ControllerRenderProps } from 'react-hook-form'
+
+import type { ReplicationPublication } from 'data/replication/publications-query'
import {
+ Badge,
Button,
cn,
Command_Shadcn_,
@@ -18,9 +21,8 @@ import {
} from 'ui'
interface PublicationsComboBoxProps {
- publications: string[]
+ publications: ReplicationPublication[]
isLoadingPublications: boolean
- isLoadingCheck: boolean
onNewPublicationClick: () => void
field: ControllerRenderProps<any, 'publicationName'>
}
@@ -28,7 +30,6 @@ interface PublicationsComboBoxProps {
export const PublicationsComboBox = ({
publications,
isLoadingPublications,
- isLoadingCheck,
onNewPublicationClick,
field,
}: PublicationsComboBoxProps) => {
@@ -65,13 +66,7 @@ export const PublicationsComboBox = ({
'w-full [&>span]:w-full text-left',
!selectedPublication && 'text-foreground-muted'
)}
- iconRight={
- isLoadingCheck ? (
- <Loader2 className="animate-spin" size={14} />
- ) : (
- <ChevronsUpDown className="text-foreground-muted" strokeWidth={2} size={14} />
- )
- }
+ iconRight={<ChevronsUpDown className="text-foreground-muted" strokeWidth={2} size={14} />}
name={field.name}
onBlur={field.onBlur}
>
@@ -86,6 +81,11 @@ export const PublicationsComboBox = ({
value={searchTerm}
onValueChange={setSearchTerm}
/>
+ <div className="px-2 pt-2 pb-1">
+ <p className="text-xs text-foreground-lighter">
+ Publications with no tables are hidden
+ </p>
+ </div>
<CommandList_Shadcn_>
<CommandEmpty_Shadcn_>
{isLoadingPublications ? (
@@ -107,19 +107,27 @@ export const PublicationsComboBox = ({
<ScrollArea className={publications.length > 7 ? 'h-[210px]' : ''}>
{publications.map((pub) => (
<CommandItem_Shadcn_
- key={pub}
+ key={pub.name}
className="cursor-pointer flex items-center justify-between space-x-2 w-full"
onSelect={() => {
- handlePublicationSelect(pub)
+ handlePublicationSelect(pub.name)
}}
onClick={() => {
- handlePublicationSelect(pub)
+ handlePublicationSelect(pub.name)
}}
>
- <span>{pub}</span>
- {selectedPublication === pub && (
- <Check className="text-brand" strokeWidth={2} size={13} />
- )}
+ <span>{pub.name}</span>
+ <div className="flex items-center gap-2">
+ <Badge
+ variant="default"
+ className="rounded-full px-2 py-0.5 text-[10px] font-normal border border-border bg-surface-100"
+ >
+ {pub.tables.length} {pub.tables.length === 1 ? 'table' : 'tables'}
+ </Badge>
+ {selectedPublication === pub.name && (
+ <Check className="text-brand" strokeWidth={2} size={13} />
+ )}
+ </div>
</CommandItem_Shadcn_>
))}
</ScrollArea>
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/ValidationFailuresSection.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/ValidationFailuresSection.tsx
new file mode 100644
index 00000000000..e3408acdba7
--- /dev/null
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/ValidationFailuresSection.tsx
@@ -0,0 +1,71 @@
+import type { ValidationFailure } from 'data/replication/validate-destination-mutation'
+import {
+ Accordion_Shadcn_,
+ AccordionContent_Shadcn_,
+ AccordionItem_Shadcn_,
+ AccordionTrigger_Shadcn_,
+ Badge,
+ Card,
+} from 'ui'
+import { Admonition } from 'ui-patterns'
+
+interface ValidationFailuresSectionProps {
+ destinationFailures: ValidationFailure[]
+ pipelineFailures: ValidationFailure[]
+}
+
+export const ValidationFailuresSection = ({
+ destinationFailures,
+ pipelineFailures,
+}: ValidationFailuresSectionProps) => {
+ const validationIssues = [...destinationFailures, ...pipelineFailures].sort((a, b) =>
+ a.failure_type === 'critical' ? -1 : 1
+ )
+
+ const criticalFailures = validationIssues.filter((f) => f.failure_type === 'critical')
+ const warnings = validationIssues.filter((f) => f.failure_type === 'warning')
+
+ const hasCriticalFailures = criticalFailures.length > 0
+ const hasWarnings = warnings.length > 0
+
+ if (validationIssues.length === 0) {
+ return null
+ }
+
+ return (
+ <Admonition
+ type={hasCriticalFailures ? 'warning' : 'default'}
+ className="px-5 rounded-none border-0"
+ title="Destination configuration issues"
+ >
+ <p className="text-sm text-foreground-light !mb-2">
+ {hasCriticalFailures
+ ? `Please fix all required issues below${hasWarnings ? ' and review the others' : ''} before continuing.`
+ : 'The following issues were identified, although you may still proceed to create the destination.'}
+ </p>
+ <Card>
+ <Accordion_Shadcn_ type="multiple">
+ {validationIssues.map((failure, idx) => (
+ <AccordionItem_Shadcn_
+ key={idx}
+ value={`${failure.name}+${idx}`}
+ className="last:border-b-0"
+ >
+ <AccordionTrigger_Shadcn_ className="text-sm px-3 text-foreground decoration-foreground-lighter">
+ <p className="flex items-center gap-x-2">
+ {failure.name}
+ {failure.failure_type === 'critical' && <Badge variant="warning">Required</Badge>}
+ </p>
+ </AccordionTrigger_Shadcn_>
+ <AccordionContent_Shadcn_ className="px-3">
+ <p className="whitespace-pre-wrap text-sm">
+ {failure.reason.replaceAll('\n\n', '\n')}
+ </p>
+ </AccordionContent_Shadcn_>
+ </AccordionItem_Shadcn_>
+ ))}
+ </Accordion_Shadcn_>
+ </Card>
+ </Admonition>
+ )
+}
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx
index 5783b7e8af1..9143453ec5a 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx
@@ -1,7 +1,8 @@
import { zodResolver } from '@hookform/resolvers/zod'
import { PermissionAction } from '@supabase/shared-types/out/constants'
+import { AnimatePresence, motion } from 'framer-motion'
import { snakeCase } from 'lodash'
-import { useEffect, useMemo, useState } from 'react'
+import { useEffect, useMemo, useRef, useState } from 'react'
import { useForm } from 'react-hook-form'
import { toast } from 'sonner'
import * as z from 'zod'
@@ -10,7 +11,6 @@ import { useFlag, useParams } from 'common'
import { CreateAnalyticsBucketSheet } from 'components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketSheet'
import { getKeys, useAPIKeysQuery } from 'data/api-keys/api-keys-query'
import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query'
-import { useCheckPrimaryKeysExists } from 'data/database/primary-keys-exists-query'
import {
BatchConfig,
BigQueryDestinationConfig,
@@ -25,10 +25,15 @@ import { useRestartPipelineHelper } from 'data/replication/restart-pipeline-help
import { useReplicationSourcesQuery } from 'data/replication/sources-query'
import { useStartPipelineMutation } from 'data/replication/start-pipeline-mutation'
import { useUpdateDestinationPipelineMutation } from 'data/replication/update-destination-pipeline-mutation'
+import {
+ useValidateDestinationMutation,
+ type ValidationFailure,
+} from 'data/replication/validate-destination-mutation'
+import { useValidatePipelineMutation } from 'data/replication/validate-pipeline-mutation'
import { useIcebergNamespaceCreateMutation } from 'data/storage/iceberg-namespace-create-mutation'
import { useS3AccessKeyCreateMutation } from 'data/storage/s3-access-key-create-mutation'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
-import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
+import { Loader2 } from 'lucide-react'
import {
PipelineStatusRequestStatus,
usePipelineRequestStatus,
@@ -38,12 +43,14 @@ import { DestinationType } from '../DestinationPanel.types'
import { AdvancedSettings } from './AdvancedSettings'
import { CREATE_NEW_KEY, CREATE_NEW_NAMESPACE } from './DestinationForm.constants'
import { DestinationPanelFormSchema as FormSchema } from './DestinationForm.schema'
+import { buildDestinationConfigForValidation } from './DestinationForm.utils'
import { DestinationNameInput } from './DestinationNameInput'
import { AnalyticsBucketFields, BigQueryFields } from './DestinationPanelFields'
import { NewPublicationPanel } from './NewPublicationPanel'
import { NoDestinationsAvailable } from './NoDestinationsAvailable'
import { PublicationSelection } from './PublicationSelection'
import { ReplicationDisclaimerDialog } from './ReplicationDisclaimerDialog'
+import { ValidationFailuresSection } from './ValidationFailuresSection'
const formId = 'destination-editor'
@@ -67,7 +74,6 @@ export const DestinationForm = ({
onClose,
}: DestinationFormProps) => {
const { ref: projectRef } = useParams()
- const { data: project } = useSelectedProjectQuery()
const { setRequestStatus } = usePipelineRequestStatus()
const etlEnableBigQuery = useFlag('etlEnableBigQuery')
@@ -81,6 +87,15 @@ export const DestinationForm = ({
const [pendingFormValues, setPendingFormValues] = useState<z.infer<typeof FormSchema> | null>(
null
)
+ const [hasRunValidation, setHasRunValidation] = useState(false)
+ const [destinationValidationFailures, setDestinationValidationFailures] = useState<
+ ValidationFailure[]
+ >([])
+ const [pipelineValidationFailures, setPipelineValidationFailures] = useState<ValidationFailure[]>(
+ []
+ )
+
+ const validationSectionRef = useRef<HTMLDivElement>(null)
const editMode = !!existingDestination
@@ -141,6 +156,14 @@ export const DestinationForm = ({
const { mutateAsync: createNamespace, isPending: isCreatingNamespace } =
useIcebergNamespaceCreateMutation()
+ const { mutateAsync: validateDestination, isPending: isValidatingDestination } =
+ useValidateDestinationMutation()
+
+ const { mutateAsync: validatePipeline, isPending: isValidatingPipeline } =
+ useValidatePipelineMutation()
+
+ const isValidating = isValidatingDestination || isValidatingPipeline
+
const defaultValues = useMemo(() => {
const config = destinationData?.config
const isBigQueryConfig = config && 'big_query' in config
@@ -150,12 +173,12 @@ export const DestinationForm = ({
// Common fields
name: destinationData?.name ?? '',
publicationName: pipelineData?.config.publication_name ?? '',
- maxFillMs: pipelineData?.config?.batch?.max_fill_ms,
+ maxFillMs: pipelineData?.config?.batch?.max_fill_ms ?? 10000, // Default: 10 seconds
// BigQuery fields
projectId: isBigQueryConfig ? config.big_query.project_id : '',
datasetId: isBigQueryConfig ? config.big_query.dataset_id : '',
serviceAccountKey: isBigQueryConfig ? config.big_query.service_account_key : '',
- maxStalenessMins: isBigQueryConfig ? config.big_query.max_staleness_mins : undefined,
+ maxStalenessMins: isBigQueryConfig ? config.big_query.max_staleness_mins : undefined, // Default: null
// Analytics Bucket fields
warehouseName: isIcebergConfig ? config.iceberg.supabase.warehouse_name : '',
namespace: isIcebergConfig ? config.iceberg.supabase.namespace : '',
@@ -221,17 +244,28 @@ export const DestinationForm = ({
const publicationNames = useMemo(() => publications?.map((pub) => pub.name) ?? [], [publications])
const isSelectedPublicationMissing =
isSuccessPublications && !!publicationName && !publicationNames.includes(publicationName)
- const selectedPublication = publications.find((pub) => pub.name === publicationName)
-
- const { data: checkPrimaryKeysExistsData, isPending: isLoadingCheck } = useCheckPrimaryKeysExists(
- {
- projectRef: project?.ref,
- connectionString: project?.connectionString,
- tables: selectedPublication?.tables ?? [],
- },
- { enabled: visible && !!selectedPublication }
- )
- const hasTablesWithNoPrimaryKeys = (checkPrimaryKeysExistsData?.offendingTables ?? []).length > 0
+
+ const allValidationFailures = [...destinationValidationFailures, ...pipelineValidationFailures]
+ const hasValidationFailures = allValidationFailures.some((f) => f.failure_type === 'critical')
+
+ const isSaving =
+ creatingDestinationPipeline ||
+ updatingDestinationPipeline ||
+ startingPipeline ||
+ isCreatingS3AccessKey ||
+ isCreatingNamespace ||
+ isValidating
+
+ const isSubmitDisabled =
+ isSaving || isSelectedPublicationMissing || (!editMode && hasNoAvailableDestinations)
+
+ const getSubmitButtonText = () => {
+ if (editMode) {
+ return existingDestination?.enabled ? 'Apply and restart' : 'Apply and start'
+ } else {
+ return 'Create and start'
+ }
+ }
// Helper function to handle namespace creation if needed
const resolveNamespace = async (data: z.infer<typeof FormSchema>) => {
@@ -249,6 +283,68 @@ export const DestinationForm = ({
return data.namespace
}
+ // Helper function to validate configuration
+ const validateConfiguration = async (data: z.infer<typeof FormSchema>) => {
+ if (!projectRef || !sourceId) return false
+
+ setHasRunValidation(true)
+
+ // Call both validation endpoints in parallel and wait for both to complete
+ // even if one fails - this makes the validation feel like a single operation
+ const results = await Promise.allSettled([
+ validateDestination({
+ projectRef,
+ destinationConfig: buildDestinationConfigForValidation({ projectRef, selectedType, data }),
+ }),
+ validatePipeline({
+ projectRef,
+ sourceId,
+ publicationName: data.publicationName,
+ maxFillMs: data.maxFillMs,
+ }),
+ ])
+
+ // Extract results from settled promises
+ const destResult = results[0]
+ const pipelineResult = results[1]
+
+ // Check if any validation request failed completely
+ const hasRequestError = results.some((r) => r.status === 'rejected')
+
+ if (hasRequestError) {
+ // If any request failed, show a generic error and stop
+ toast.error('Failed to validate configuration. Please try again.')
+ setHasRunValidation(false)
+ return false
+ }
+
+ // Both requests succeeded, extract validation failures
+ const destValidationResult =
+ destResult.status === 'fulfilled' ? destResult.value : { validation_failures: [] }
+ const pipelineValidationResult =
+ pipelineResult.status === 'fulfilled' ? pipelineResult.value : { validation_failures: [] }
+
+ setDestinationValidationFailures(destValidationResult.validation_failures)
+ setPipelineValidationFailures(pipelineValidationResult.validation_failures)
+
+ // Check if there are critical failures or warnings
+ const allFailures = [
+ ...destValidationResult.validation_failures,
+ ...pipelineValidationResult.validation_failures,
+ ]
+ const hasCriticalFailures = allFailures.some((f) => f.failure_type === 'critical')
+ const hasAnyFailures = allFailures.length > 0
+
+ // Scroll to validation section if there are any failures
+ if (hasAnyFailures) {
+ setTimeout(() => {
+ validationSectionRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' })
+ }, 100)
+ }
+
+ return !hasCriticalFailures
+ }
+
// [Joshen] I reckon this function can be refactored to be a bit more modular, it's currently pretty
// complicated with 4 different types of flows -> edit bigquery/analytics, and create bigquery/analytics
// At first glance we could try grouping as edit / create bigquery, edit / create analytics
@@ -409,22 +505,20 @@ export const DestinationForm = ({
}
}
- const isSaving =
- creatingDestinationPipeline ||
- updatingDestinationPipeline ||
- startingPipeline ||
- isCreatingS3AccessKey ||
- isCreatingNamespace
-
- const isSubmitDisabled =
- isSaving ||
- isSelectedPublicationMissing ||
- (!!selectedPublication && isLoadingCheck) ||
- hasTablesWithNoPrimaryKeys ||
- (!editMode && hasNoAvailableDestinations)
-
const onSubmit = async (data: z.infer<typeof FormSchema>) => {
if (!editMode) {
+ // For new pipelines, validate configuration first if not already validated
+ // OR if user has critical failures and clicks "Validate again"
+ if (!hasRunValidation || isValidating || hasValidationFailures) {
+ const isValid = await validateConfiguration(data)
+ if (!isValid) {
+ // Validation failed with critical errors, show inline and stop
+ return
+ }
+ // Validation passed or only has warnings, continue to disclaimer
+ }
+
+ // Validation passed or only warnings, proceed to disclaimer
setPendingFormValues(data)
setShowDisclaimerDialog(true)
return
@@ -460,6 +554,9 @@ export const DestinationForm = ({
if (visible) {
form.reset(defaultValues)
setIsFormInteracting(false)
+ setHasRunValidation(false)
+ setDestinationValidationFailures([])
+ setPipelineValidationFailures([])
}
}, [visible, defaultValues, form])
@@ -506,22 +603,53 @@ export const DestinationForm = ({
<DialogSectionSeparator />
<AdvancedSettings type={selectedType} form={form} />
+
+ {!editMode && hasRunValidation && !isValidating && (
+ <>
+ <DialogSectionSeparator />
+
+ <div ref={validationSectionRef}>
+ <ValidationFailuresSection
+ destinationFailures={destinationValidationFailures}
+ pipelineFailures={pipelineValidationFailures}
+ />
+ </div>
+ </>
+ )}
</form>
</Form_Shadcn_>
)}
</SheetSection>
- <SheetFooter>
- <Button disabled={isSaving} type="default" onClick={onClose}>
- Cancel
- </Button>
- <Button disabled={isSubmitDisabled} loading={isSaving} form={formId} htmlType="submit">
- {editMode
- ? existingDestination?.enabled
- ? 'Apply and restart'
- : 'Apply and start'
- : 'Create and start'}
- </Button>
+ <SheetFooter className="!justify-between">
+ <AnimatePresence mode="wait">
+ {isValidating || isSaving ? (
+ <motion.div
+ className="flex items-center gap-x-2"
+ initial={{ opacity: 0, y: 5 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: 5 }}
+ transition={{ duration: 0.2, ease: 'easeOut' }}
+ >
+ <Loader2 className="animate-spin" size={14} />
+ <p className="text-foreground-light text-sm">
+ {isValidating
+ ? 'Validating destination configuration...'
+ : 'Creating destination...'}
+ </p>
+ </motion.div>
+ ) : (
+ <div />
+ )}
+ </AnimatePresence>
+ <div className="flex items-center gap-x-2">
+ <Button disabled={isSaving} type="default" onClick={onClose}>
+ Cancel
+ </Button>
+ <Button disabled={isSubmitDisabled} loading={isSaving} form={formId} htmlType="submit">
+ {getSubmitButtonText()}
+ </Button>
+ </div>
</SheetFooter>
<NewPublicationPanel
diff --git a/apps/studio/components/interfaces/Database/Replication/UpdateVersionModal.tsx b/apps/studio/components/interfaces/Database/Replication/UpdateVersionModal.tsx
index f19a3de4a86..4cccaf04f92 100644
--- a/apps/studio/components/interfaces/Database/Replication/UpdateVersionModal.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/UpdateVersionModal.tsx
@@ -47,7 +47,7 @@ export const UpdateVersionModal = ({
const statusName = getStatusName(pipelineStatus)
const isStopped = statusName === PipelineStatusName.STOPPED
- const { data: versionData } = useReplicationPipelineVersionQuery({
+ const { data: versionData, isPending: isLoadingVersion } = useReplicationPipelineVersionQuery({
projectRef,
pipelineId: pipeline?.id,
})
@@ -125,11 +125,15 @@ export const UpdateVersionModal = ({
<div className="flex flex-col gap-y-2 mt-2 pb-2">
<div className="text-sm text-foreground prose max-w-full">
<p className="text-foreground-light mb-1">Current version:</p>{' '}
- <code className="text-code-inline">{currentVersionName ?? 'Unknown'}</code>
+ <code className="text-code-inline">
+ {isLoadingVersion ? 'Loading...' : currentVersionName ?? 'Unknown'}
+ </code>
</div>
<div className="text-sm text-foreground prose max-w-full">
<p className="text-foreground-light mb-1">New version:</p>{' '}
- <code className="text-code-inline">{newVersionName ?? 'Unknown'}</code>
+ <code className="text-code-inline">
+ {isLoadingVersion ? 'Loading...' : newVersionName ?? 'Unknown'}
+ </code>
</div>
</div>
</CollapsibleContent_Shadcn_>
diff --git a/apps/studio/data/replication/publications-query.ts b/apps/studio/data/replication/publications-query.ts
index baa75854e4e..e547fbda4a1 100644
--- a/apps/studio/data/replication/publications-query.ts
+++ b/apps/studio/data/replication/publications-query.ts
@@ -29,7 +29,15 @@ async function fetchReplicationPublications(
handleError(error)
}
- return data.publications.filter((pub) => pub.name !== 'supabase_realtime')
+ // Filter out:
+ // 1. supabase_realtime (internal publication)
+ // 2. Publications with no tables (would cause validation to fail)
+ const filteredPublications = data.publications.filter(
+ (pub) => pub.name !== 'supabase_realtime' && pub.tables.length > 0
+ )
+
+ // Sort publications alphabetically by name
+ return filteredPublications.sort((a, b) => a.name.localeCompare(b.name))
}
export type ReplicationPublicationsData = Awaited<ReturnType<typeof fetchReplicationPublications>>
diff --git a/apps/studio/data/replication/validate-destination-mutation.ts b/apps/studio/data/replication/validate-destination-mutation.ts
new file mode 100644
index 00000000000..f9468b2ae3a
--- /dev/null
+++ b/apps/studio/data/replication/validate-destination-mutation.ts
@@ -0,0 +1,86 @@
+import { useMutation } from '@tanstack/react-query'
+
+import type { components } from 'api-types'
+import { handleError, post } from 'data/fetchers'
+import type { ResponseError, UseCustomMutationOptions } from 'types'
+import { DestinationConfig } from './create-destination-pipeline-mutation'
+
+type ValidateDestinationParams = {
+ projectRef: string
+ destinationConfig: DestinationConfig
+}
+
+type ValidateDestinationResponse = components['schemas']['ValidateDestinationResponse']
+export type ValidationFailure = ValidateDestinationResponse['validation_failures'][number]
+
+async function validateDestination(
+ { projectRef, destinationConfig }: ValidateDestinationParams,
+ signal?: AbortSignal
+): Promise<ValidateDestinationResponse> {
+ if (!projectRef) throw new Error('projectRef is required')
+
+ // Build destination_config based on the type
+ let config: components['schemas']['ValidateReplicationDestinationBody']['config']
+
+ if ('bigQuery' in destinationConfig) {
+ const { projectId, datasetId, serviceAccountKey, maxStalenessMins } = destinationConfig.bigQuery
+
+ config = {
+ big_query: {
+ project_id: projectId,
+ dataset_id: datasetId,
+ service_account_key: serviceAccountKey,
+ ...(maxStalenessMins !== undefined ? { max_staleness_mins: maxStalenessMins } : {}),
+ },
+ }
+ } else if ('iceberg' in destinationConfig) {
+ const {
+ projectRef: icebergProjectRef,
+ namespace,
+ warehouseName,
+ catalogToken,
+ s3AccessKeyId,
+ s3SecretAccessKey,
+ s3Region,
+ } = destinationConfig.iceberg
+
+ config = {
+ iceberg: {
+ supabase: {
+ namespace,
+ project_ref: icebergProjectRef,
+ warehouse_name: warehouseName,
+ catalog_token: catalogToken,
+ s3_access_key_id: s3AccessKeyId,
+ s3_secret_access_key: s3SecretAccessKey,
+ s3_region: s3Region,
+ },
+ },
+ }
+ } else {
+ throw new Error('Invalid destination config: must specify either bigQuery or iceberg')
+ }
+
+ const { data, error } = await post('/platform/replication/{ref}/destinations/validate', {
+ params: { path: { ref: projectRef } },
+ body: { config },
+ signal,
+ })
+
+ if (error) handleError(error)
+ return data as ValidateDestinationResponse
+}
+
+type ValidateDestinationData = Awaited<ReturnType<typeof validateDestination>>
+
+export const useValidateDestinationMutation = (
+ options?: Omit<
+ UseCustomMutationOptions<ValidateDestinationData, ResponseError, ValidateDestinationParams>,
+ 'mutationFn'
+ >
+) => {
+ return useMutation<ValidateDestinationData, ResponseError, ValidateDestinationParams>({
+ mutationFn: (vars) => validateDestination(vars),
+ ...options,
+ })
+}
diff --git a/apps/studio/data/replication/validate-pipeline-mutation.ts b/apps/studio/data/replication/validate-pipeline-mutation.ts
new file mode 100644
index 00000000000..67d3be6acd2
--- /dev/null
+++ b/apps/studio/data/replication/validate-pipeline-mutation.ts
@@ -0,0 +1,50 @@
+import { useMutation } from '@tanstack/react-query'
+import { components } from 'api-types'
+
+import { handleError, post } from 'data/fetchers'
+import type { ResponseError, UseCustomMutationOptions } from 'types'
+
+type ValidatePipelineParams = {
+ projectRef: string
+ sourceId: number
+ publicationName: string
+ maxFillMs?: number
+}
+type ValidatePipelineResponse = components['schemas']['ValidatePipelineResponse']
+
+async function validatePipeline(
+ { projectRef, sourceId, publicationName, maxFillMs }: ValidatePipelineParams,
+ signal?: AbortSignal
+): Promise<ValidatePipelineResponse> {
+ if (!projectRef) throw new Error('projectRef is required')
+ if (!sourceId) throw new Error('sourceId is required')
+
+ const { data, error } = await post('/platform/replication/{ref}/pipelines/validate', {
+ params: { path: { ref: projectRef } },
+ body: {
+ source_id: sourceId,
+ config: {
+ publication_name: publicationName,
+ ...(maxFillMs !== undefined ? { batch: { max_fill_ms: maxFillMs } } : {}),
+ },
+ },
+ signal,
+ })
+
+ if (error) handleError(error)
+ return data as ValidatePipelineResponse
+}
+
+type ValidatePipelineData = Awaited<ReturnType<typeof validatePipeline>>
+
+export const useValidatePipelineMutation = (
+ options?: Omit<
+ UseCustomMutationOptions<ValidatePipelineData, ResponseError, ValidatePipelineParams>,
+ 'mutationFn'
+ >
+) => {
+ return useMutation<ValidatePipelineData, ResponseError, ValidatePipelineParams>({
+ mutationFn: (vars) => validatePipeline(vars),
+ ...options,
+ })
+}
diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts
index 6908cefc155..92ae6a57d52 100644
--- a/packages/api-types/types/api.d.ts
+++ b/packages/api-types/types/api.d.ts
@@ -4633,6 +4633,10 @@ export interface components {
}
V1ServiceHealthResponse: {
error?: string
+ /**
+ * @deprecated
+ * @description Deprecated. Use `status` instead.
+ */
healthy: boolean
info?:
| {
@@ -4644,6 +4648,10 @@ export interface components {
| {
connected_cluster: number
db_connected: boolean
+ /**
+ * @deprecated
+ * @description Deprecated. Use `status` instead.
+ */
healthy: boolean
}
| {
diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts
index f9c6465edfa..54861b411af 100644
--- a/packages/api-types/types/platform.d.ts
+++ b/packages/api-types/types/platform.d.ts
@@ -3451,6 +3451,26 @@ export interface paths {
patch?: never
trace?: never
}
+ '/platform/replication/{ref}/destinations/validate': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /**
+ * Validate destination configuration
+ * @description Validates that the destination is accessible and properly configured. Requires bearer auth and an active, healthy project.
+ */
+ post: operations['ReplicationDestinationsController_validateDestination']
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/platform/replication/{ref}/pipelines': {
parameters: {
query?: never
@@ -3555,7 +3575,7 @@ export interface paths {
put?: never
/**
* Rollback pipeline tables
- * @description Rollback the replication state of tables in the pipeline. Supports rolling back a single table or all tables with manual retry errors. Requires bearer auth and an active, healthy project.
+ * @description Rollback the replication state of tables in the pipeline. Supports rolling back a single table, all errored tables or all tables. Requires bearer auth and an active, healthy project.
*/
post: operations['ReplicationPipelinesController_rollbackTables']
delete?: never
@@ -3648,6 +3668,26 @@ export interface paths {
patch?: never
trace?: never
}
+ '/platform/replication/{ref}/pipelines/validate': {
+ parameters: {
+ query?: never
+ header?: never
+ path?: never
+ cookie?: never
+ }
+ get?: never
+ put?: never
+ /**
+ * Validate pipeline configuration
+ * @description Validates pipeline prerequisites against the source database. Requires bearer auth and an active, healthy project.
+ */
+ post: operations['ReplicationPipelinesController_validatePipeline']
+ delete?: never
+ options?: never
+ head?: never
+ patch?: never
+ trace?: never
+ }
'/platform/replication/{ref}/sources': {
parameters: {
query?: never
@@ -6965,11 +7005,14 @@ export interface components {
/** @enum {string} */
key:
| 'instances.compute_update_available_sizes'
+ | 'instances.read_replicas'
+ | 'replication.etl'
| 'storage.max_file_size'
| 'security.audit_logs_days'
| 'security.questionnaire'
| 'security.soc2_report'
| 'security.private_link'
+ | 'security.enforce_mfa'
| 'log.retention_days'
| 'custom_domain'
| 'vanity_subdomain'
@@ -6980,8 +7023,14 @@ export interface components {
| 'branching_persistent'
| 'auth.mfa_phone'
| 'auth.mfa_web_authn'
+ | 'auth.mfa_enhanced_security'
| 'auth.hooks'
| 'auth.platform.sso'
+ | 'auth.custom_jwt_template'
+ | 'auth.saml_2'
+ | 'auth.user_sessions'
+ | 'auth.leaked_password_protection'
+ | 'auth.advanced_auth_settings'
| 'backup.retention_days'
| 'function.max_count'
| 'function.size_limit_mb'
@@ -6992,6 +7041,10 @@ export interface components {
| 'realtime.max_bytes_per_second'
| 'realtime.max_presence_events_per_second'
| 'realtime.max_payload_size_in_kb'
+ | 'project_scoped_roles'
+ | 'security.member_roles'
+ | 'project_pausing'
+ | 'project_cloning'
/** @enum {string} */
type: 'boolean' | 'numeric' | 'set'
}
@@ -7894,14 +7947,14 @@ export interface components {
| 'billing:payment_methods'
| 'realtime:all'
)[]
- first_name: string
- free_project_limit: number
+ first_name: string | null
+ free_project_limit: number | null
gotrue_id: string
id: number
is_alpha_user: boolean
is_sso_user: boolean
- last_name: string
- mobile: string
+ last_name: string | null
+ mobile: string | null
primary_email: string
username: string
}
@@ -10517,6 +10570,147 @@ export interface components {
role?: string
updated_at?: string
}
+ ValidateDestinationResponse: {
+ /** @description List of validation failures */
+ validation_failures: {
+ /**
+ * @description Failure type
+ * @example critical
+ * @enum {string}
+ */
+ failure_type: 'critical' | 'warning'
+ /**
+ * @description Validation failure name
+ * @example BigQuery Dataset Not Found
+ */
+ name: string
+ /**
+ * @description Validation failure reason
+ * @example Dataset 'my_dataset' does not exist in project 'my_project'
+ */
+ reason: string
+ }[]
+ }
+ ValidatePipelineResponse: {
+ /** @description List of validation failures */
+ validation_failures: {
+ /**
+ * @description Failure type
+ * @example critical
+ * @enum {string}
+ */
+ failure_type: 'critical' | 'warning'
+ /**
+ * @description Validation failure name
+ * @example Publication Not Found
+ */
+ name: string
+ /**
+ * @description Validation failure reason
+ * @example Publication 'my_publication' does not exist in the source database
+ */
+ reason: string
+ }[]
+ }
+ ValidateReplicationDestinationBody: {
+ /** @description Destination configuration */
+ config:
+ | {
+ big_query: {
+ /**
+ * @description BigQuery dataset id
+ * @example analytics
+ */
+ dataset_id: string
+ /**
+ * @description Maximum number of concurrent write streams
+ * @example 8
+ */
+ max_concurrent_streams?: number
+ /**
+ * @description Maximum data staleness in minutes
+ * @example 5
+ */
+ max_staleness_mins?: number
+ /**
+ * @description BigQuery project id
+ * @example my-gcp-project
+ */
+ project_id: string
+ /** @description BigQuery service account key */
+ service_account_key: string
+ }
+ }
+ | {
+ iceberg: {
+ supabase: {
+ /**
+ * @description Catalog token
+ * @example A jwt secret
+ */
+ catalog_token: string
+ /**
+ * @description Namespace
+ * @example my-namespace
+ */
+ namespace?: string
+ /**
+ * @description Project ref
+ * @example abcdefghijklmnopqrst
+ */
+ project_ref: string
+ /**
+ * @description S3 access key ID
+ * @example 53383b1d0cdb16a3afa63152656aa3cc
+ */
+ s3_access_key_id: string
+ /**
+ * @description S3 region
+ * @example ap-southeast-1
+ */
+ s3_region: string
+ /**
+ * @description S3 secret access key
+ * @example 25a0c5e69d847088a3e6ffb901adf4d19bbf74a400dec2ee49f46401039b3258
+ */
+ s3_secret_access_key: string
+ /**
+ * @description Warehouse name
+ * @example my-warehouse
+ */
+ warehouse_name: string
+ }
+ }
+ }
+ }
+ ValidateReplicationPipelineBody: {
+ /** @description Pipeline configuration */
+ config: {
+ /** @description Batch configuration */
+ batch?: {
+ /**
+ * @description Maximum fill time in milliseconds
+ * @example 200
+ */
+ max_fill_ms?: number
+ /**
+ * @description Maximum batch size
+ * @example 200
+ */
+ max_size?: number
+ }
+ /**
+ * @description Publication name
+ * @example pub_orders
+ */
+ publication_name: string
+ }
+ /**
+ * @description Source id
+ * @example 3001
+ */
+ source_id: number
+ }
ValidateSpamBody: {
content: string
subject: string
@@ -14634,7 +14828,7 @@ export interface operations {
}
requestBody?: never
responses: {
- /** @description MFA enfocement state on organization. */
+ /** @description MFA enforcement state on organization. */
201: {
headers: {
[name: string]: unknown
@@ -14689,7 +14883,7 @@ export interface operations {
}
}
responses: {
- /** @description MFA enfocement state on organization updated successfully. */
+ /** @description MFA enforcement state on organization updated successfully. */
201: {
headers: {
[name: string]: unknown
@@ -22677,6 +22871,61 @@ export interface operations {
}
}
}
+ ReplicationDestinationsController_validateDestination: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['ValidateReplicationDestinationBody']
+ }
+ }
+ responses: {
+ /** @description Validation completed. */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['ValidateDestinationResponse']
+ }
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Unexpected error while validating destination. */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
ReplicationPipelinesController_getPipelines: {
parameters: {
query?: never
@@ -23372,6 +23621,61 @@ export interface operations {
}
}
}
+ ReplicationPipelinesController_validatePipeline: {
+ parameters: {
+ query?: never
+ header?: never
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ cookie?: never
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['ValidateReplicationPipelineBody']
+ }
+ }
+ responses: {
+ /** @description Validation completed. */
+ 200: {
+ headers: {
+ [name: string]: unknown
+ }
+ content: {
+ 'application/json': components['schemas']['ValidatePipelineResponse']
+ }
+ }
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Forbidden action */
+ 403: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Rate limit exceeded */
+ 429: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ /** @description Unexpected error while validating pipeline. */
+ 500: {
+ headers: {
+ [name: string]: unknown
+ }
+ content?: never
+ }
+ }
+ }
ReplicationSourcesController_getSources: {
parameters: {
query?: never