mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Retire the deprecated Iceberg (Analytics Bucket) destination from Pipelines. ## Solution - Remove the destination UI, configuration mappings, feature-flag usage, and generated API variants. - Remove the legacy Pipelines integration from Storage while preserving standalone Analytics Buckets. - Remove unused components and sheet-layout support, and add regression coverage for retained Storage operations. - Remove the stale Pipelines claim from the Storage docs overview. ## Validation - Pipelines, Storage, and replication data tests - After the final cleanup: Studio typecheck and all 3 Analytics Bucket regression tests passed. - Formatting, scoped ESLint, Knip, and whitespace checks passed; lint warnings are pre-existing. - Storage overview: Prettier, ESLint with zero warnings, content-listing schema validation, and Markdown rendering passed. Production API-type verification remains pending the coordinated API deployment. Legacy Iceberg pipelines, destinations, and slots must be cleaned up before rollout. ## Review instructions 1. Verify that Pipelines offers BigQuery, DuckLake, Snowflake, and ClickHouse, with no Analytics Bucket option. 2. Verify that Storage Analytics Bucket creation, namespace/table operations, and wrapper/key cleanup remain available without Pipelines controls. ## Checklist - [x] Read CONTRIBUTING.md. - [x] Updated the Storage overview copy and checked the docs authoring guidance. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
97 lines
3.6 KiB
TypeScript
97 lines
3.6 KiB
TypeScript
import { fireEvent, screen } from '@testing-library/react'
|
|
import { mockAnimationsApi } from 'jsdom-testing-mocks'
|
|
import { useForm } from 'react-hook-form'
|
|
import { Form } from 'ui'
|
|
import { describe, expect, it, vi } from 'vitest'
|
|
|
|
import { AdvancedSettings } from '../DestinationPanel/DestinationForm/AdvancedSettings'
|
|
import type { DestinationPanelSchemaType } from '../DestinationPanel/DestinationForm/DestinationForm.schema'
|
|
import type { DestinationType } from '../DestinationPanel/DestinationPanel.types'
|
|
import { PipelineConnectionSection } from './PipelineConnectionSection'
|
|
import { customRender } from '@/tests/lib/custom-render'
|
|
|
|
vi.mock('../DestinationPanel/DestinationForm/BigQuery/TableOptions', () => ({
|
|
TableOptions: () => <p>Table layout controls</p>,
|
|
}))
|
|
|
|
mockAnimationsApi()
|
|
|
|
const TestSection = ({
|
|
type,
|
|
group = 'connection',
|
|
}: {
|
|
type: DestinationType
|
|
group?: 'connection' | 'data'
|
|
}) => {
|
|
const form = useForm<DestinationPanelSchemaType>({
|
|
defaultValues: {
|
|
name: '',
|
|
connectionPoolSize: 5,
|
|
maxStalenessMins: 0,
|
|
ducklakePoolSize: 2,
|
|
snowflakeRole: '',
|
|
},
|
|
})
|
|
return (
|
|
<Form {...form}>
|
|
{group === 'data' ? (
|
|
<AdvancedSettings type={type} form={form} group="data" />
|
|
) : (
|
|
<PipelineConnectionSection type={type} form={form}>
|
|
<p>Credentials</p>
|
|
</PipelineConnectionSection>
|
|
)}
|
|
</Form>
|
|
)
|
|
}
|
|
|
|
describe('PipelineConnectionSection', () => {
|
|
it.each<{ type: DestinationType; label: string }>([
|
|
{ type: 'BigQuery', label: 'Connection pool size' },
|
|
{ type: 'DuckLake', label: 'Pool size' },
|
|
{ type: 'Snowflake', label: 'Role' },
|
|
])('groups $type connection fields separately from replication settings', ({ type, label }) => {
|
|
customRender(<TestSection type={type} />)
|
|
expect(screen.getByRole('region', { name: 'Destination connection' })).toBeInTheDocument()
|
|
expect(screen.getByRole('textbox', { name: 'Pipeline name' })).toBeInTheDocument()
|
|
expect(screen.getByText('Pipeline region')).toBeInTheDocument()
|
|
expect(screen.getByText('Credentials')).toBeInTheDocument()
|
|
fireEvent.click(screen.getByRole('button', { name: /Advanced settings/ }))
|
|
expect(screen.getByText(`Adjust how data is written to ${type}.`)).toBeInTheDocument()
|
|
expect(screen.getByLabelText(label)).toBeInTheDocument()
|
|
expect(screen.queryByText('Batch wait time')).not.toBeInTheDocument()
|
|
expect(screen.queryByText('Table layout')).not.toBeInTheDocument()
|
|
})
|
|
|
|
it.each<DestinationType>(['BigQuery', 'DuckLake', 'Snowflake'])(
|
|
'keeps %s data settings separate from connection settings',
|
|
(type) => {
|
|
customRender(<TestSection type={type} group="data" />)
|
|
fireEvent.click(screen.getByRole('button', { name: /Advanced settings/ }))
|
|
for (const label of [
|
|
'Batch wait time',
|
|
'Table sync workers',
|
|
'Initial sync connections per table',
|
|
'Invalidated slot behavior',
|
|
]) {
|
|
expect(screen.getByText(label)).toBeInTheDocument()
|
|
}
|
|
expect(
|
|
screen.getByText('Adjust initial sync and replication slot behavior.')
|
|
).toBeInTheDocument()
|
|
for (const label of ['Connection pool size', 'Maximum staleness', 'Pool size', 'Role']) {
|
|
expect(screen.queryByText(label)).not.toBeInTheDocument()
|
|
}
|
|
expect(screen.queryByText('Table layout controls') !== null).toBe(type === 'BigQuery')
|
|
}
|
|
)
|
|
|
|
it.each<DestinationType>(['ClickHouse'])(
|
|
'does not show an empty connection accordion for %s',
|
|
(type) => {
|
|
customRender(<TestSection type={type} />)
|
|
expect(screen.queryByRole('button', { name: /Advanced settings/ })).not.toBeInTheDocument()
|
|
}
|
|
)
|
|
})
|