Proposal: Adding 'subscription' commands
Hi all - it would be really useful for L&R Support if we could look up some of the Subscription data that isn't surfaced anywhere outside of the SaaS Console.
These specifically would be very useful for diagnose issues such as #4377 and 4965:
- GitLabSubscription models
-
GitlabSubscriptionHistory models
- Even just the GitlabSubscriptionHistory model with the highest max_seat count for a namespace would be very useful!
- For 4965 specifically it would be very useful to be able to request the max_seats a namespace used during a trial.
Currently L&R struggles to diagnose the max_seat or subscription issues where the data isn't surfaced openly.
The commands for the models above could be implemented like these (respectively):
/chatops run subscription find <namespace>
-
/chatops run history find <namespace>
/chatops run history find_max <namespace>
Proposed approach:
-
ChatOps uses
/namespaces/<namespaceID>
to obtain data about the requests namespace - Currently this endpoint does not return some of the important
GitLabSubscription[History]
data (such asmax_seats_used_changed_at
) - So the first step would be adding the desired properties to the response template for this endpoint
- The second step would be adding any additional properties to this function that creates the Slack response
Examples:
-
@s_shaik helpfully provided some console output in this Slack thread showing the data that could be exposed
- Properties that could be exposed from
GitlabSubscription
:max_seats_used_changed_at
auto_renew
last_seat_refresh_at
- Properties that could be exposed from
GitlabSubscriptionHistory
:- Unclear which properties would be useful to surface
- This record type saves the previous state of a GitLabSubscription prior to an update (so could be useful for
Previous_max_seats_count
orPrevious_max_seat_change_date
)
- Properties that could be exposed from
Edited by Tom McAtee