You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(providers/azure): use SDK enum constant for appliedScopeType in purchase bodies #14
During adversarial review of PR LeanerCloud/cloud-commitments-cli#1208, all Azure service clients were found to use `"Shared"` as a raw string literal for the `appliedScopeType` field in reservation purchase request bodies.
All service clients that build a purchase request body:
`providers/azure/services/cache/client.go`
`providers/azure/services/compute/client.go`
`providers/azure/services/cosmosdb/client.go`
`providers/azure/services/database/client.go`
`providers/azure/services/managedredis/client.go`
`providers/azure/services/search/client.go`
`providers/azure/services/synapse/client.go`
Fix
Replace `"appliedScopeType": "Shared"` with `"appliedScopeType": string(armreservations.AppliedScopeTypeShared)` in each client's `PurchaseCommitment` method (7 occurrences, one per service).
Note
This is a code-quality / forward-safety improvement only. The current literal `"Shared"` is the correct value and matches the SDK constant; there is no live bug here. The risk is that a typo in a future edit would not be caught at compile time.
Activity