mirror of
https://github.com/supabase/supabase.git
synced 2026-07-26 17:32:31 -04:00
61754a0eec
## Details of change
Adds Snowflake to the Studio replication destination flow:
- destination selection and display
- create/edit form fields
- validate/create/update payload serialization
- generated Platform API types
Snowflake remains gated behind `etlEnableSnowflakePrivateAlpha`.
**Note:** I have configured `etlEnableSnowflakePrivateAlpha` in
ConfigCat ("all" in staging and tied to my own org id in prod).
## Details of Verification Process
- Studio focused Vitest coverage for form serialization and diagram
mapping
- Studio typecheck
- ESLint on changed Studio replication files
- Local `mise fullstack:dev` smoke test to confirm the Snowflake form
renders ok.
<img width="937" height="569" alt="image"
src="https://github.com/user-attachments/assets/8d6b3a87-1f9d-4a59-91da-be719714ea49"
/>
Full create/validate E2E depends on the Platform PR and ETL runtime
rollout.
## Review Requests
Please check the Snowflake wire payload matches the Platform/ETL
contract and that gating/edit/display behavior follows the existing ETL
destination patterns.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Snowflake added as a supported replication destination (private-alpha
gated), including UI for selecting and configuring connection and auth
(account, user, database, schema, role, private key, optional
passphrase).
* **Validation**
* Form validation and submission now handle Snowflake-specific
required/optional fields.
* **Tests**
* Unit tests added for Snowflake form behavior and replication-type
detection.
* **API**
* Destination create/update/validate flows extended to accept Snowflake
payloads.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
27 lines
932 B
TypeScript
27 lines
932 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { getReplicationDestinationType } from './Nodes.utils'
|
|
|
|
describe('getReplicationDestinationType', () => {
|
|
it('returns BigQuery for big_query configs', () => {
|
|
expect(getReplicationDestinationType({ big_query: {} })).toBe('BigQuery')
|
|
})
|
|
|
|
it('returns Analytics Bucket for iceberg configs', () => {
|
|
expect(getReplicationDestinationType({ iceberg: {} })).toBe('Analytics Bucket')
|
|
})
|
|
|
|
it('returns DuckLake for ducklake configs', () => {
|
|
expect(getReplicationDestinationType({ ducklake: {} })).toBe('DuckLake')
|
|
})
|
|
|
|
it('returns Snowflake for snowflake configs', () => {
|
|
expect(getReplicationDestinationType({ snowflake: {} })).toBe('Snowflake')
|
|
})
|
|
|
|
it('returns undefined for unknown or missing configs', () => {
|
|
expect(getReplicationDestinationType({})).toBeUndefined()
|
|
expect(getReplicationDestinationType(undefined)).toBeUndefined()
|
|
})
|
|
})
|