Support server groups in workload spawner#560
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes add server group selection and management functionality to the spawner CLI. A new types package introduces a ServerGroup struct. CLI methods enable selection of server groups and policies. The main application now discovers, optionally deletes, creates server groups, and integrates them with VM spawning via scheduler hints. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant CLI as Spawner CLI
participant API as OpenStack API
participant ServerCreate as Server Creation
User->>CLI: Run spawner
CLI->>API: List server groups (os-server-groups)
API-->>CLI: Existing groups
alt Groups found with matching prefix
CLI->>User: Prompt to delete existing groups
User-->>CLI: Confirm deletion
CLI->>API: Delete groups (concurrent)
API-->>CLI: Deletion complete
end
CLI->>API: Re-fetch server groups
API-->>CLI: Updated groups list
alt User opts to create new group
CLI->>User: Prompt for server group policy
User-->>CLI: Select policy
CLI->>API: Create new server group (POST os-server-groups)
API-->>CLI: New group ID
CLI->>CLI: Track selectedServerGroupID
end
CLI->>User: Proceed to server creation
User-->>CLI: Confirm VM spawn
CLI->>ServerCreate: Pass selectedServerGroupID via SchedulerHintOpts.Group
ServerCreate->>API: Create servers with group affinity
API-->>ServerCreate: Servers created
ServerCreate-->>CLI: Creation complete
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.Change the |
|
I will merge this without a review since it is only development tooling. |
Test Coverage ReportTest Coverage 📊: 67.9% |
Support server groups in the workload spawner, so we can spawn vms with anti-affinity or affinity rules.
Summary by CodeRabbit