Customer Console
Overview
Using the customer console for internal requests is only for specials cases where the existing tools won’t allow us to complete the task at hand.
Console access requires a completed Access Request as outlined in the Customers Console training and its completion.
The scope of what’s outlined in this workflow is for frequently used functions which are pre-loaded via Customers Console and Functions project.
Using the support console
After logging into the CustomersDot server, enter the command:
|
|
This will open the rails console and automatically load the functions available to use.
Most functions rely on the namespace (i.e. GitLab.com Group name or username), always make sure to have it handy before starting any work from the console.
Consider creating a Shell alias such as the below:
|
|
- If needed, review the Production SSH Config settings here for more information on configuring your local SSH settings to access the console.
Scope
The console will be for tasks which cannot be completed from the tools we have available.
We need to see the console as a transition
stage:
graph TD A[Console Tasks] --> B(Automate within GitLab) B --> C(Integrate into the product)
The more we use a function the more we should ask ourselves why we haven’t automated that process or integrated that missing function into our product.
Search methods
view_namespace
Note: This functionality is mostly covered by namespace search in UI.
Provides a unified view for the namespace including orders and customer account linked to the orders.
Function to see namespace information and linked orders/customer profile. The function will find orders linked to the provided namespace and then customer profile linked to the orders:
graph TD C[Namespace] --> B(Order) B[Order] --> A(Customer)
Parameters
Name | Required | Details |
---|---|---|
:namespace |
Yes | The namespace to find information about |
Sample
|
|
Manual Lookup
Note: Customer name, email, company, group name, subscription name searching is available in UI.
If required, you can search for an order based on any existing order attribute. Use find_by
if you believe there is only one, or where
if you believe there may be multiple matching orders.
Example find_by
|
|
Example where
|
|
Order history
Note: Having a way to view this in the UI has been requested in customer #3081.
You can view the change history of an order using versions
.
Example
|
|
find_namespace
Note: Finding an account based on group name is available in the UI. However, accounts with trials typically do not show up due to customers #978.
Find a given GitLab.com namespace.
Parameters
Name | Required | Details |
---|---|---|
:namespace |
Yes | The namespace to search for, it can be complete or partial |
Sample
|
|
Plan Methods
update_gitlab_plan
Note: This can be deprecated when this is available in the UI which will require showing expired trials (customers #1173), ability to extend (customers #1643), and for the Gitlab account to be tied to customers portal to show GitLab Groups after a trial is initiated (customers #973).
Use cases for this function:
- Extend an active or reactivate an expired trial.
- Downgrade to free.
- “Extend” a subscription by creating a trial if one does not exist. If an old trial exists, it will reuse it.
The function will change the minutes quota to the paid plan equivalent, and add additional minutes to get around shared runner cc requirement.
Name | Required | Details |
---|---|---|
:namespace |
Yes | The namespace to update using the path |
:plan |
Yes | The plan to assign to the namespace (free, bronze, silver, gold) |
:expire |
No | Optional parameter, if entered the existing subscription will be extended up to this date |
:subscription |
No | Required to extend a subscription, but not for trials. |
Sample
|
|
force_attr
If the order has the subscription number, but a number of nil values (especially product plan), then use this function to have the system look up the values in Zuora and copy them over.
Parameters
Name | Required | Details |
---|---|---|
:subscription_name |
Yes | Subscription name in the order to update |
Sample
|
|
force_reassociation
Note: The ability to do this in the UI is customers #2165.
Force a .com group to be associated with a given subscription. This is typically done to associate a group without charging additional seats.
Parameters
Name | Required | Details |
---|---|---|
:subscription_name |
Yes | The subscription name to be re-associated |
:namespace_path |
Yes | The unique Gitlab namespace path |
Sample
|
|
unlink_sub
This function sets the group ID and name to nil
to the order and downgrades the group to Free.
This is typically done if there are issues associating a different subscription but the existing subscription should show for user.
Parameters
Name | Required | Details |
---|---|---|
:subscription_name |
Yes | Subscription name in the order to update |
Sample
|
|
unlink_customer
Note: Ability to do this in UI is customers #2166.
Completely unlink a GitLab.com account from a CustomersDot account. Note: Use the customer ID (from customers portal, not GitLab.com).
Warning: Unlinking means the .com groups will no longer show. This is typically only used when an admin accidentally links their account to a customers.
Parameters
Name | Required | Details |
---|---|---|
:customer_id |
Yes | Customer ID to be unlinked from it’s GitLab account. |
Sample
|
|
associate_full_user_count_with_group
Note: Feature request is customers #2167.
When the subscription has multiple products listed, then the quantity (seats) is only pulled from the product plan line. Add-on seats are not automatically added. The function adds the seat count for all products listed for the subscription and copies it over to .com.
Parameters
This function requires a subscription name.
Name | Required | Details |
---|---|---|
:subscription_name |
Yes | Subscription name as it appears in Zuora, e.g., A-S12345678 |
Sample
|
|
enable_ci_minutes
This function allows removal of the CC validation only for sale supported trials to prevent having to enroll these users credit cards to use CI/CD by adding additional minutes.
Parameters
This function requires a namespace object
Name | Required | Details |
---|---|---|
:namespace |
Yes | Namespace to update |
Sample
|
|
create_order_from_zuora
On rare occasions, an Order object may not exist in customersDot for a subscription in Zuora. This function creates a valid Order from the subscription data found in Zuora which can then be linked to a namespace.
Use cases for this function:
- Entity changes
- System bugs
Parameters
Name | Required | Details |
---|---|---|
:customer_id |
Yes | The ID number of a customersDot account linked to the billing account, e.g., the subscription must appear in their cDot account |
:subscription_name |
Yes | Subscription name as it appears in Zuora, e.g., A-S12345678 |
Sample
|
|
GitLab.com Group methods
These functions help fix various bug issues that have surfaced on GitLab.com. These functions do not change anything in the CustomersDot.
Reset max seats
Occasionally, to ensure the correct number at renewal, the number of max seats need to be changed for a group.
Parameters
With only the namespace, it will display the seats information. Entering the max seats will change the value.
Name | Required | Details |
---|---|---|
:namespace | Yes | The namespace to update |
:max_seats_used | No | Max number of seats to use |
Sample
|
|
update_group_mins
Note: Possible through GitLab.com admin.
Update a group’s shared runner minutes monthly quota.
Parameters
Name | Required | Details |
---|---|---|
:id |
Yes | The namespace ID to update |
:mins |
Yes | Compute minutes to update |
Sample
|
|
update_extra_minutes
Note: Additional minutes can also be changed via chatops. Feature request for editing via UI in gitlab#325917.
Update a group’s additional runner minutes.
WARNING: Additional minutes added using this function will last indefinitely until used. If the request is to provide “extra minutes” during a trial period only, use the update_group_mins function to change the monthly usage quota, or the update_gitlab_plan function which will set the usage quota to match a paid plan.
Parameters
Name | Required | Details |
---|---|---|
:namespace |
Yes | The namespace to update |
:mins |
Yes | Compute minutes to update |
Sample
|
|
update_extra_storage
Note: Additional storage can also be changed via API. Feature request for editing via UI in gitlab#325918.
Update a group’s additional storage.
Parameters
Name | Required | Details |
---|---|---|
:namespace |
Yes | The namespace to update |
:extra_storage |
Yes | Amount of additional storage in MiB |
Sample
|
|
container_registry_storage_usage
Note: For a large group, this may take several hours. If unsure, ask for help before running it.
Calculates the storage usage of the container registry for each project in a given group, the output is the total result in GB and detailed per project.
Parameters
Name | Required | Details |
---|---|---|
:group |
Yes | The group to query |
Sample
|
|
FAQ
- How can I add a function?
- With the decision made on Mechanizer and Hacks Maintenance mode we won’t be adding more functions into the mechanizer
- Can I use other code not available in
support_team.rb
?
- Functions and parts of functions from
support_team.rb
can be executed within console as needed. Otherwise, the only time other code should be run is under direction from the Fulfillment development team to help debug or workaround an issue.
Manually changing attributes
We should avoid the editing of live data as much as possible, even a small change could cause a problem later and affect the customer in a bigger way than the original reason for us to do the change.
The guidance is to only use the functions in support_team.rb
. If we don’t have anything that helps, then a feature request should be opened and prioritized.
Within the feature request, we can ask for a temporary workaround to the dev team in order for us to be able to act on those requests while the official product enhancement is completed.
f348e5a6
)