Open
Conversation
Introduce a declarative SP Pool feature that lets users assign a set of
preparations and storage providers with a per-provider replication policy
(e.g. {"market": 1, "pdp": 1}), and automatically generates and manages
Schedules to match the desired state.
- New models: SPPool, SPPoolProvider, SPPoolPreparation with
ReplicationPolicy custom JSON type
- Add SPPoolProviderID FK to Schedule for tracking generated schedules
- Full CRUD + mutation handlers with inline reconciliation engine
- REST API: 11 endpoints under /api/sp-pool
- CLI: singularity deal sp-pool {create,list,get,update,remove,pause,
resume,add-provider,remove-provider,add-preparation,remove-preparation}
- Tests for reconciliation (cross-product, idempotency, policy change,
pause/resume) and handler validation
35b56b1 to
3c132b0
Compare
Collaborator
Author
|
Re-scoped this PR per review feedback. The SP Pool machinery is gone; the branch now just adds a string group label on schedules, --group on schedule create/update, and a deal schedule create-batch command for the cross-product and replication expansion logic. Full repo test pass is green after codegen (go test ./...). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{"market": 1, "pdp": 1}), and the system auto-generates/manages Schedules to match the desired stateSPPool,SPPoolProvider,SPPoolPreparationwithReplicationPolicycustom JSON type (stored asmap[DealType]int)/api/sp-poolwith full CRUD, pause/resume, and provider/preparation managementsingularity deal sp-poolSPPoolProviderIDFK added toSchedule(SET NULL on delete) to track which schedules are pool-managedTest plan
go build ./...— compiles cleango vet ./...— no issuesgo test ./model/... ./handler/... ./api/...— all passgo generate ./...) after merge