Skip to content

feat: experimentation flagsmith warehouse setup api scaffolding#7542

Open
Zaimwa9 wants to merge 9 commits into
mainfrom
feat/experimentation-warehouse-setup-api
Open

feat: experimentation flagsmith warehouse setup api scaffolding#7542
Zaimwa9 wants to merge 9 commits into
mainfrom
feat/experimentation-warehouse-setup-api

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented May 19, 2026

Thanks for submitting a PR! Please check the boxes below:

  • 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

Contributes to #7278 #7279

Adds the experimentation Django app with a WarehouseConnection model and CRUD endpoints for V1 (Flagsmith hosted warehouse type only).

  • Model: WarehouseConnection with LifecycleModelMixin + SoftDeleteExportableModel, ForeignKey to Environment, conditional unique constraint on (warehouse_type, environment).
  • API: WarehouseConnectionViewSet (List, Create, Retrieve, Destroy) at environments/<env_api_key>/warehouse-connections/. Soft-delete resurrection on re-creation. 409 on duplicate.
  • Gating: WarehouseConnectionPermission — Feature flag + environment admin check.
  • Audit: AuditLog entries on create and delete with RelatedObjectType.WAREHOUSE_CONNECTION.

How did you test this code?

@Zaimwa9 Zaimwa9 requested a review from gagantrivedi May 19, 2026 16:02
@Zaimwa9 Zaimwa9 requested a review from a team as a code owner May 19, 2026 16:02
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview May 20, 2026 8:47am
flagsmith-frontend-preview Ignored Ignored Preview May 20, 2026 8:47am
flagsmith-frontend-staging Ignored Ignored Preview May 20, 2026 8:47am

Request Review

@Zaimwa9 Zaimwa9 marked this pull request as draft May 19, 2026 16:02
@github-actions github-actions Bot added the api Issue related to the REST API label May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Docker builds report

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

@github-actions github-actions Bot added the feature New feature or request label May 19, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.5 seconds
commit  9257a5a
info  🔄 Run: #16830 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.9 seconds
commit  9257a5a
info  🔄 Run: #16830 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  4.5 seconds
commit  9257a5a
info  🔄 Run: #16830 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  50.7 seconds
commit  9257a5a
info  🔄 Run: #16830 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  32.8 seconds
commit  307d545
info  🔄 Run: #16853 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.2 seconds
commit  307d545
info  🔄 Run: #16853 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  37 seconds
commit  307d545
info  🔄 Run: #16853 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  48.2 seconds
commit  307d545
info  🔄 Run: #16853 (attempt 1)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Visual Regression

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

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels May 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.48%. Comparing base (82c5dfb) to head (307d545).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7542    +/-   ##
========================================
  Coverage   98.47%   98.48%            
========================================
  Files        1400     1413    +13     
  Lines       53036    53329   +293     
========================================
+ Hits        52226    52519   +293     
  Misses        810      810            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels May 20, 2026
@Zaimwa9 Zaimwa9 changed the title feat: experimentation warehouse setup api scaffolding feat: experimentation flagsmith warehouse setup api scaffolding May 20, 2026
Comment on lines +41 to +42
"uuid",
models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
Copy link
Copy Markdown
Contributor Author

@Zaimwa9 Zaimwa9 May 20, 2026

Choose a reason for hiding this comment

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

I hesitated between UUID and integerID, let me know what you think

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer int because uuid takes a lot more space, but either is fine here, doesn't make much of a difference.

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels May 20, 2026
@Zaimwa9 Zaimwa9 marked this pull request as ready for review May 20, 2026 08:48
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants