Files
supabase/apps/studio/components/interfaces/ProjectCreation/WarehouseFdwCustomImage.constants.ts
Coenen BenjaminandCharis Lam 11289328e5 add support for warehouse connection string (#49914)
Add support for connection string for warehouse. 
This PR gives the ability to enable warehouse on a project and also get
the connection string to connect to.

> This project is only available in staging for now and gated behind a
feature flag

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
  - Added a Warehouse connection option to the Connect dialog.
- Select schemas and tables to replicate, with setup progress, error
recovery, and retry support.
- View copyable Warehouse connection details, credentials guidance,
command-line instructions, and DuckLake setup scripts.
  - Warehouse availability is controlled by feature configuration.

- **Tests**
- Added coverage for Warehouse table selection, setup script generation,
URL parsing, and connection configuration utilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2026-09-07 11:24:42 +02:00

31 lines
1.1 KiB
TypeScript

export const WAREHOUSE_FDW_CUSTOM_POSTGRES_VERSION =
'15.14.1.138-fdw-warehouse-74b5ba9-r7-adminapi110'
export const WAREHOUSE_FDW_CUSTOM_DB_VERSION = `supabase-postgres-${WAREHOUSE_FDW_CUSTOM_POSTGRES_VERSION}`
export const WAREHOUSE_FDW_CUSTOM_INSTANCE_TYPE = 't4g.micro'
export const WAREHOUSE_FDW_CUSTOM_REGION_NAME = 'Southeast Asia (Singapore)'
export const WAREHOUSE_FDW_CUSTOM_REGION_SELECTION = {
type: 'specific',
code: 'ap-southeast-1',
} as const
export const WAREHOUSE_FDW_CUSTOM_REQUEST = {
enabled: true,
secret_region: 'ap-southeast-1',
endpoint: 'https://quaxy-flight-staging.fdw-warehouse.supabase.green',
tls_domain_name: 'quaxy-flight-staging.fdw-warehouse.supabase.green',
jwt_kid: 'fdw-warehouse-staging',
jwt_issuer: 'fdw-warehouse',
jwt_audience: 'quaxy-flight',
jwt_ttl_secs: 300,
} as const
export const normalizeCustomPostgresVersion = (version?: string) =>
version?.trim().replace(/^supabase-postgres-/, '') ?? ''
export const isWarehouseFdwCustomPostgresVersion = (version?: string) =>
normalizeCustomPostgresVersion(version) === WAREHOUSE_FDW_CUSTOM_POSTGRES_VERSION