feat(router): reuse unchanged feature flag muxes on graph server#2823
feat(router): reuse unchanged feature flag muxes on graph server#2823dkorittki wants to merge 5 commits intofeat/split-configsfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR implements a feature-flag-based split-configuration loading mechanism for the router. It adds a new ChangesSplit-Config Loading Feature
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (61.05%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## feat/split-configs #2823 +/- ##
=====================================================
Coverage ? 65.98%
=====================================================
Files ? 256
Lines ? 26845
Branches ? 0
=====================================================
Hits ? 17714
Misses ? 7728
Partials ? 1403
🚀 New features to boost your workflow:
|
Router image scan passed✅ No security vulnerabilities found in image: |
When a new graph server gets build it needs to know which muxes to replace and which to keep. The split config poller can provide this information. Since the config pollers are abstracted behind an interface I needed to extend the interface. I did so by extending the routerconfig.Response type to include a field which indicates what changed on the config. The old, default config poller can't provide these information, so it returns nil. nil indicates that no change information is provided. This must not be confused with "no changes have happened" - two very different things. It's expected that during graph server creation changes=nil is treated as "rebuild everything". This design ensures backwards compatibility: router token has no split-config feature => use old config poller => provides changes=nil => graph server creation rebuilds everything.
86e7d25 to
454400e
Compare
Makes use of the new split config poller, which has the ability to tell what feature flag configs have changed. We pass this information down to
newGraphServerwhere we use it to reuse unchanged feature flag as well as base graph muxes. The change is backwards compatible: The old poller indicates it can' tell what changed and the callers then go the old path: rebuild everything.Summary by CodeRabbit
Checklist
Open Source AI Manifesto
This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.