feat(edge-proxy): Wire the flagsmith-private edge_proxy app into the api - #8305
feat(edge-proxy): Wire the flagsmith-private edge_proxy app into the api#8305gagantrivedi wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change detects the optional Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change conditionally exposes the Edge Proxy application and its API routes for supported deployments while keeping them unavailable in SaaS deployments; no actionable merge-blocking risk remains after normal checks and review. 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8305 +/- ##
=======================================
Coverage 98.81% 98.81%
=======================================
Files 1621 1621
Lines 66102 66103 +1
=======================================
+ Hits 65318 65319 +1
Misses 784 784 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
42c4d60 to
eb468cc
Compare
Docker builds report
|
Detects the edge_proxy app and mounts its two URL trees: proxy key management for organisation admins, and the environment inventory that Edge Proxy instances poll. The feature is for private cloud only. SaaS images ship the private wheel, so the mount is gated on is_saas() at runtime rather than on the app being absent; the app's own views carry a matching permission as defence in depth.
✅ private-cloud · depot-ubuntu-latest-16 — run #19945 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19945 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19945 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19945 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19943 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19943 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19943 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19944 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19944 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19943 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
247cfc9 to
4330617
Compare
Visual Regression19 screenshots compared. See report for details. |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to Flagsmith/edge-proxy#128
Wires up the
edge_proxyprivate app (Flagsmith/flagsmith-private#265 — merged, released inflagsmith-private0.13.0, whichmainalready locks), adding the proxy key credential and the proxy config endpoint that let a running Edge Proxy discover its environments. Consumed by the proxy in Flagsmith/edge-proxy-rs#17 and Flagsmith/edge-proxy-rs#18.Three edits, following the
rbac/scimpattern:EDGE_PROXY_INSTALLEDdetection and conditionalINSTALLED_APPSappend.organisations/{id}/edge-proxy/, andapi/v1/proxy/for the proxy config endpoint.Private cloud only: SaaS images ship the private wheel, so the mounts are gated on
is_saas()at runtime rather than on the app being absent; the app's own views carry a matching permission as defence in depth.How did you test this code?
With the released
flagsmith-private==0.13.0wheel installed (the versionmainlocks):EDGE_PROXY_INSTALLEDisTrue,edge_proxyis inINSTALLED_APPS, and both URL trees resolve (/api/v1/proxy/config/,/api/v1/organisations/1/edge-proxy/keys/). With aSAAS_DEPLOYMENTmarker file present they 404 (reverse()raisesNoReverseMatch). The app's own behaviour is covered by the integration tests merged with #265.