CI Minutes provisioning - Trigger Purchase Identifiers syncs from CustomersDot to GitLab Minutes API
Establish CI Minute Purchase Identifiers on CustomersDot
The following outlines requirements from the architecture proposal as defined in !3142, we've split up the tasks into separate issues along system boundaries.
Base components: CustomersDot
-
Add a mechanism to return an object/data structure that represents 1+ minute packs purchases with a unique identifier (e.g. RatePlanCharge ID
from Zuora) with anexpiry_date
, minutes purchased, and the namespace. -
Create a trigger for CI minutes purchases to sync/callback to GitLab CI Minutes API endpoint with Purchase Identifier data -
Trigger CI Minute purchase sync/callback to GitLab minutes API with a successful purchase.
UI Components: CustomersDot
-
Update Admin UI with a component that can trigger a callback to GitLab to sync CI Minute Purchase DataEdit: moved to #3451
Previous Summary
## Summary-
Create an API that we can fetch usage CI minutes statistics for a given namespace -
Adapt UpdateGitlabPlanInfoWorker (UpdatePlanInfoService) or create wholly new a mechanism that can send CI Minute purchase information over to GItLab from CustomersDot.
Availability & Testing
In addition to any unit specs, we also should write integration tests between the the GitLab Minutes API and CustomersDot. These integration tests can use mock APIs.
Additionally, an end-to-end test would also be recommended for executing the flow of provisioning more CI minutes and being reflected in both CustomersDot and GitLab.
Edited by Vijay Hawoldar