Allow routing-profiles overrides for VPC updates - #4463
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Summary by CodeRabbit
WalkthroughVPC update APIs now accept routing-profile overrides with validation, persistence, replacement, and reset semantics. Network version hashing now includes routing-profile state for every tenant interface. Tests cover update rejection, inheritance, persistence, and cache invalidation. ChangesVPC routing-profile update support
Network version cache hashing
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant VPCUpdateHandler
participant RoutingProfileResolver
participant VpcDatabase
Client->>VPCUpdateHandler: submit routing_profile_overrides
VPCUpdateHandler->>VpcDatabase: load persisted VPC
VPCUpdateHandler->>RoutingProfileResolver: resolve candidate overrides
RoutingProfileResolver-->>VPCUpdateHandler: return resolved profile
VPCUpdateHandler->>VpcDatabase: persist validated update
VpcDatabase-->>Client: return updated VPC
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
0b6b37f to
83b9adc
Compare
🔐 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-07-31 23:11:16 UTC | Commit: 83b9adc |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/agent/src/main_loop.rs`:
- Around line 1685-1688: Update the InterfaceChange::ProfilePresence test cases
around second_profile to use RoutingProfile::default() without setting
leak_tenant_host_routes_to_underlay. Keep the profile-present setup focused
solely on presence, then remove it, and apply the same adjustment to the
corresponding cases at the other referenced locations.
In `@crates/api-core/src/handlers/vpc.rs`:
- Around line 180-191: Update the VPC lookup in the handler to use
db::vpc::find_by_with_lock with txn.as_mut() and db::vpc::VpcRowLock::Mutation
before validation. Preserve the existing filter and NotFoundError behavior while
ensuring the row remains locked through update_virtualization and the versioned
write.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0e42c8ef-c9ff-422c-92e2-1979612be275
⛔ Files ignored due to path filters (1)
rest-api/proto/core/gen/v1/nico_nico.pb.gois excluded by!**/*.pb.go,!**/gen/**,!rest-api/**/*.pb.go
📒 Files selected for processing (10)
crates/admin-cli/src/rpc.rscrates/agent/src/main_loop.rscrates/api-core/src/cfg/README.mdcrates/api-core/src/handlers/vpc.rscrates/api-core/src/tests/vpc.rscrates/api-db/src/vpc.rscrates/api-model/src/vpc/mod.rscrates/rpc/proto/forge.protocrates/rpc/src/model/vpc.rsrest-api/proto/core/src/v1/nico_nico.proto
83b9adc to
6fdbc20
Compare
|
🌿 Preview your docs: https://nvidia-preview-pull-request-4463.docs.buildwithfern.com/infra-controller |
6fdbc20 to
8bca0a8
Compare
8bca0a8 to
616d4df
Compare
#4411 allows routing-profiles overrides for VPC creation.
This PR continues the support through VPC updates. Similarly, each explicitly supplied override replaces the corresponding base-profile value, while omitted properties continue to inherit from the named profile. The operator-controlled internal and access_tier properties cannot be overridden at the VPC level.
Agent also has a minor update to include interface-level profiles in the additional hashing it does to detect config changes.
Related issues
#2624
Type of Change
Breaking Changes
Testing
Additional Notes
#2624