mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 13:19:09 +03:00
## Problem In **Add pipeline**, the managed DuckLake configuration method (**Select Supabase projects**) lets users pick any project in their organization for the catalog and for storage. For now, managed DuckLake should only use the current project. ## Solution - Rename the option to **Use this Supabase project** and remove the **Catalog project** and **Storage project** selectors. Users still set **Metadata schema** and **Bucket**. - Remove `ducklakeCatalogProjectRef` and `ducklakeStorageProjectRef` from the form schema, default values, and validation rather than hiding them, so the form can't carry another project's ref. `buildDucklakeConfig` sets both `catalogProjectRef` and `storageProjectRef` to the current project ref, which the config builders already receive from the URL. - The bucket list and the **New bucket** dialog always target the current project. The cross-region warning is removed because it can no longer trigger. - `data/replication` (types and API payload mapping) is unchanged. It still sends `project_ref` for the catalog and storage, now always the current project. - Fix in passing: creating a bucket from the dialog now sets the field with `shouldDirty` and `shouldValidate`, so a stale "Bucket is required." error clears. - Edit mode and **Enter connection details** are unchanged. The DuckLake docs page (`apps/docs/content/guides/database/replication/pipelines/ducklake.mdx`) still describes choosing separate projects. It'll be updated in a follow-up PR that should merge after this one ships. ## Review instructions 1. Open a project, go to **Database** > **Pipelines**, select **Add pipeline**, and choose **DuckLake**. 2. Under **Configuration method**, check that the first option is **Use current Supabase project** and that there's no **Catalog project** or **Storage project** selector. 3. Open the **Bucket** list and check that it shows the current project's buckets. **New bucket** creates a private bucket in the current project. 4. Create the pipeline and check that the request sends the current project ref as both `catalog.project_ref` and `storage.project_ref`. 5. Run the unit tests: `cd apps/studio && pnpm vitest run components/interfaces/Database/Replication/DestinationPanel/DestinationForm data/replication` ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>