Skip to content

feat(experimentation): warehouse connection verification UI#7678

Open
Zaimwa9 wants to merge 5 commits into
mainfrom
feat/experimentation-test-connection
Open

feat(experimentation): warehouse connection verification UI#7678
Zaimwa9 wants to merge 5 commits into
mainfrom
feat/experimentation-test-connection

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Jun 2, 2026

  • I have read the Contributing Guide.
  • 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

Frontend for verifying a Flagsmith-managed warehouse connection.

  • "Send your first event" emits a test_custom_event via a per-environment Flagsmith SDK instance (preventFetch + empty defaultFlags, so no customer flag config is fetched) and calls POST .../test-warehouse-connection/ to move the connection to pending_connection.
  • While pending_connection, the warehouse tab polls the connections GET every 30s; the backend flips it to connected once an event lands.
  • Wires real total_events_received / unique_events_count into the stats panel; shows a "can take a few hours" message + "Verify now" while pending; hides the button once connected.
  • Adds a flagsmithClientEventsAPI config per environment (events-ingestor URL).

How did you test this code?

  • new tests and against staging

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner June 2, 2026 14:44
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team June 2, 2026 14:44
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jun 2, 2026 2:45pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jun 2, 2026 2:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Jun 2, 2026 2:45pm

Request Review

@Zaimwa9
Copy link
Copy Markdown
Contributor Author

Zaimwa9 commented Jun 2, 2026

@gemini-code-assist review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7678 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7678 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7678 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7678 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7678 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-e2e:pr-7678 Finished ✅ Skipped

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ability to test and verify Flagsmith warehouse connections from the frontend. It adds a new testWarehouseConnection mutation, updates the warehouse connection card to display event statistics and handle pending connection states, and implements a polling mechanism that queries the connection status every 30 seconds while pending. It also adds a utility to send a test custom event using a dedicated Flagsmith instance. The review feedback points out a critical issue where trackEvent will silently fail without an active identity; it suggests initializing the SDK with a dummy identity and a shorter event flushing interval, along with updating the corresponding unit tests.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.5 seconds
commit  aacbc99
info  🔄 Run: #17180 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.4 seconds
commit  aacbc99
info  🔄 Run: #17180 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  19 passed

Details

stats  19 tests across 15 suites
duration  1 minute, 21 seconds
commit  aacbc99
info  🔄 Run: #17180 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  46.8 seconds
commit  aacbc99
info  🔄 Run: #17180 (attempt 1)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Visual Regression

19 screenshots compared. See report for details.
View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants