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
ARCH-12: Provider factory/registry bypassed; internal layer hard-codes Azure/GCP constructors and deprecated Profile field #41
Evidence:
Credentialed paths bypass the registry (azureprovider.NewAzureProvider(&provider.ProviderConfig{Profile: acct.AzureSubscriptionID}) then SetCredential; gcpprovider.NewProviderWithCredentials(...)), and scheduler.go:778 populates the Profile field whose own doc says "Deprecated: ... Prefer the typed AWSProfile/AzureSubscriptionID/GCPProjectID fields". handler_ri_exchange.go imports concrete AWS/Azure packages into the generic HTTP layer.
Impact:
Split-brained dependency direction; adding a provider or changing credential resolution requires touching scheduler, purchase and api individually; live deprecated-field call sites block its removal.
Recommendation:
Route credentialed Azure/GCP construction through the factory using the existing AzureTokenCredential/GCPTokenSource slots; switch to the typed AzureSubscriptionID field; lift exchange operations onto a capability interface or isolate concrete wiring in one composition file.
Status update (2026-10-28): #1565 merged: every concrete provider constructor the RI exchange and Marketplace handlers use now lives in internal/api/provider_wiring.go, and an import-guard test keeps concrete provider packages out of the rest of internal/api.
Left: removing the deprecated Profile field, which is a cloud-commitments-go change, and the direct AWS SDK calls (sts, ec2) in the Marketplace files, which would need new library code.
Removing the deprecated ProviderConfig.Profile field is a cloud-commitments-go change. It now lives in LeanerCloud/cloud-commitments-go#660, together with the optional library surface for the Marketplace handlers' direct AWS calls.
Activity
IAmJSD commentedon Oct 23, 2026
Claiming: working on this
refactor(provider): build credentialed Azure/GCP providers through th…
refactor(api): move RI exchange and Marketplace provider wiring into …
IAmJSD commentedon Oct 28, 2026
Status update (2026-10-28): #1565 merged: every concrete provider constructor the RI exchange and Marketplace handlers use now lives in
internal/api/provider_wiring.go, and an import-guard test keeps concrete provider packages out of the rest ofinternal/api.Left: removing the deprecated
Profilefield, which is a cloud-commitments-go change, and the direct AWS SDK calls (sts, ec2) in the Marketplace files, which would need new library code.IAmJSD commentedon Oct 29, 2026
Closing: the platform side of ARCH-12 is done (checked on main at ae6854b).
Profile.internal/api/provider_wiring.go, behind an import guard.Removing the deprecated
ProviderConfig.Profilefield is a cloud-commitments-go change. It now lives in LeanerCloud/cloud-commitments-go#660, together with the optional library surface for the Marketplace handlers' direct AWS calls.