You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(experimentation): add the bring-your-own PostgreSQL warehouse form - #8872
No actionable comments were generated in the recent review.
Walkthrough
The warehouse settings now support PostgreSQL connections and a Flagsmith database option. The change adds PostgreSQL form validation, payload construction, connection testing, setup SQL and editing flows. It also updates warehouse type availability and Flagsmith database event routing. Shared warehouse forms now display API error details, and ClickHouse uses a shared TLS switch component.
PostgreSQL setup retains two bounded pitfalls: reserved schema names produce invalid SQL, and users following the CREATEROLE instruction may lack permission to create the schema. Ordinary schema names and a sufficiently privileged setup role provide workarounds.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
The PostgreSQL form covers the standard connection flow, but it cannot edit an existing self-hosted Flagsmith database connection and its setup instructions do not provision a custom schema. Unit Tests and lint passed; CI was still running.
Area
Score
🎯 Correctness
2/5
🧪 Test coverage
3/5
📐 Code quality
3/5
🚀 Product impact
4/5
🟠 Majors
frontend/web/components/pages/environment-settings/tabs/warehouse-tab/index.tsx — Existing Flagsmith database connections cannot be edited.
frontend/web/components/pages/environment-settings/tabs/warehouse-tab/postgresSetupSql.ts — Custom schemas are not provisioned by the onboarding instructions.
Connection management — adds PostgreSQL editing, testing and status display.
Shared forms — extracts the TLS switch and displays API error details.
🧪 How to verify
Open a self-hosted PostgreSQL connection configured with the Flagsmith database source and edit its name.
Follow onboarding with a non-default schema and verify that the dedicated user can read and insert events.
Create and edit a default-schema PostgreSQL connection, including a failed connection test.
Automate: add form integration tests for both PostgreSQL configuration modes and custom-schema onboarding.
Product take: Connecting an existing PostgreSQL warehouse makes experimentation accessible without a separate analytics warehouse, a meaningful capability for self-hosted and SaaS users.
🧭 Assumptions & unverified claims
No unverified assumptions or claims.
May the events find their way to the right schema · reviewed at bb6fdca
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
featureNew feature or requestfront-endIssue related to the React Front End Dashboard
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Follows #8863 and #8843. Adds the bring-your-own PostgreSQL warehouse to the Warehouse tab.
WarehouseTlsSwitch).How did you test this code?
Unit tests for the form config, the setup SQL and the form utils. Typecheck matches main.