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
fix(experimentation): hide the first-event button for customer warehouses on self-hosted - #8874
I have added information to docs/ if required so people know about the feature.
I have filled in the "Changes" section below.
I have filled in the "How did you test this code" section below.
Changes
On self-hosted, "Send your first event" for ClickHouse, Databricks and bring-your-own PostgreSQL posts to Flagsmith Cloud's ingestion server, which rejects the self-hosted key, so the event never lands and the button never goes away.
Show the button for customer warehouses only on SaaS; the Flagsmith database connection keeps it on self-hosted, since it posts to the installation's own API.
How did you test this code?
Unit tests for the extracted shouldShowSendFirstEvent predicate.
The change adds and tests shouldShowSendFirstEvent to determine whether to show the first-event prompt. WarehouseConnectionCard now calls this helper with the connection and SaaS status.
The change restricts customer-warehouse prompts on self-hosted installations while retaining the Flagsmith database prompt. The remaining suggestions improve test coverage and do not block merging after normal checks.
- [ ] 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.
Add a managed Flagsmith case for the connected status.
The flagsmith branch of shouldShowSendFirstEvent hides the button for connected connections. The new cases cover only created and pending_connection. Removing the connected check would leave the suite passing. Add a row with status: 'connected' and the expected result false.
Add Databricks and PostgreSQL customer-warehouse cases for SaaS.
The customer-warehouse cases use only ClickHouse. If CUSTOMER_WAREHOUSE_TYPES dropped databricks or postgres, every test in this block would still pass. The Flagsmith database case returns before the list check, so no case tests an ordinary PostgreSQL connection against the list.
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
fixfront-endIssue related to the React Front End Dashboard
2 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
On self-hosted, "Send your first event" for ClickHouse, Databricks and bring-your-own PostgreSQL posts to Flagsmith Cloud's ingestion server, which rejects the self-hosted key, so the event never lands and the button never goes away.
How did you test this code?
Unit tests for the extracted
shouldShowSendFirstEventpredicate.