fix(rest): enable Flow for new sites by default - #5629
Conversation
Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pull-request-5629.docs.buildwithfern.com/infra-controller |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-09-01 17:37:05 UTC | Commit: 2e3123a |
thossain-nv
left a comment
There was a problem hiding this comment.
@kunzhao-nv This is ok as a stop-gap but can we have a more informed way of enabling this flag? Can Site Agent discover Flow connection on startup and report it in the Site config inventory?
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. Summary by CodeRabbit
WalkthroughNewly created Sites enable ChangesSite capability defaults
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change enables Flow by default for newly REST-created Sites while leaving existing Sites unchanged; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
That makes sense. Site Agent already verifies the Flow connection through the Flow Version RPC during startup, so it can report Flow availability through Site config inventory and make that the source of truth. I’ll keep this PR as the stop-gap default and follow up with inventory-based discovery. |
…bled Signed-off-by: Kun Zhao <kunzhao@nvidia.com> # Conflicts: # rest-api/docs/index.html
Site configuration currently retains the default Flow capability without reconciling the Site Agent configuration that owns the integration. This change: - adds `flow_enabled` to `SiteAgentBuildInfo` and reports the Site Agent's configured `flowGrpcEnabled` value; - reconciles the reported value in both directions into `site.config.flow` without replacing unrelated Site configuration; - removes `flow` from the writable Site capabilities contract and explicitly rejects attempts to update it through REST; and - keeps Flow connection health separate from the configured capability so existing metrics remain the health signal. ## Related issues - Closes #5635 - Follow-up to #5629 ## Type of Change - [ ] **Add** - New feature or capability - [x] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes - [x] **This PR contains breaking changes** `capabilities.flow` is no longer accepted by the Site update API because Site Agent inventory is the authoritative writer. ## Testing - [x] Unit tests added/updated - [x] Integration tests added/updated - [ ] Manual testing performed - [ ] No testing required (docs, internal refactor, etc.) ## Additional Notes --------- Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
REST-created Sites already enable the default networking posture, but Flow remains disabled and requires a follow-up Site update before Flow-backed operations are available. This change enables Flow as part of the new-Site default posture and verifies that the API response and persisted Site configuration agree.
Existing Site records are unchanged. The new default applies only when REST creates a Site. #5635 tracks reconciliation of this value from Site Agent inventory.
Related issues
Type of Change
Breaking Changes
Testing
Additional Notes