[Snapshot-Agent Memory-Regions 1/N]: Adding proto and feature flag - #163
[Snapshot-Agent Memory-Regions 1/N]: Adding proto and feature flag#163Edwinhr716 wants to merge 4 commits into
Conversation
…e it Add MemoryRegion and MemoryRegionsBackendConfig to the BackendConfig oneof (field 5) with regenerated Go and Python bindings: selective checkpoint/restore of explicit device memory ranges of a running process, with snapshot_name naming the snapshot slot so multiple snapshots of one process can coexist (job_id fallback; deliberately not the request group, which identifies related jobs for the orchestrator and does not name agent-side storage). Route memory_regions configs to the new BackendMemoryRegions type in getSnapshotBackendType. No implementation registers this backend yet, so a memory_regions request fails cleanly at backend lookup; every other config routes exactly as before. Signed-off-by: Edwinhr716 <edandres249@gmail.com>
…ackend Register a MemoryRegionsBackend feature gate (alpha, default off) and reject memory_regions configs in checkFeatureGates when it is disabled, mirroring DirectMemoryBackend: the backend is driven by GPU-CR and requires the workload to run under the GPU-CR preloader with a shared checkpoint directory, so selecting it must be an explicit per-agent opt-in. The check runs before routing, so a gated config never falls through to another backend. Gate-independence and error-text cases are pinned in the server gate tests. Signed-off-by: Edwinhr716 <edandres249@gmail.com>
…tations Signed-off-by: Edwinhr716 <edandres249@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe snapshot-agent API now supports explicit device-memory regions through ChangesMemory regions backend
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR adds the memory-regions API and routing behind a feature flag without any supported current-head merge-blocking risk; it is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant SnapshotRequest
participant SnapshotAgentServer
participant FeatureGates
participant BackendRouter
SnapshotRequest->>SnapshotAgentServer: Submit memory_regions configuration
SnapshotAgentServer->>FeatureGates: Check MemoryRegionsBackend
FeatureGates-->>SnapshotAgentServer: Enabled or FailedPrecondition
SnapshotAgentServer->>BackendRouter: Select BackendMemoryRegions
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
What does this PR do?
adds MemoryRegion / MemoryRegionsBackendConfig (oneof field 5, snapshot_name slots) with regenerated Go/Python stubs, server routing to the new backend type, and feature flag.
Why is this change needed?
API-first slice that merges safely alone — a memory-regions request routes to an unregistered backend and fails cleanly until the backend lands
How was this tested?
Checklist
git commit -s) per DCOmake test)make lint)Related Issues
Summary by CodeRabbit
New Features
Bug Fixes