Loading
Add the Orbit start-trial mutation
What does this MR do and why?
An Owner of a top-level group can now start an Orbit trial. A later MR connects the Orbit button to it.
orbitStartTrialstarts the CustomersDot trial and turns on Orbit, in one call.- With the Orbit trial flag on,
orbitUpdateturns on Orbit only for beta groups and active trials. - Owners can start a trial. Beta groups cannot, because they already have Orbit for free.
| Case | Result |
|---|---|
| Eligible group | The trial starts and Orbit turns on |
| The trial already exists and is active | Same result, so the call is safe to repeat. No second orbit_trial_started event. |
| The trial has ended | "Your GitLab Orbit trial has ended." |
| CustomersDot rejects the group, or does not know it | "This group is not eligible for a GitLab Orbit trial." The internal event records the CustomersDot reason. |
| CustomersDot does not answer | "GitLab Orbit is not available right now. Try again later." |
| Beta group, Maintainer, or subgroup | Access error |
orbitUpdate on a group whose trial has ended |
"Your GitLab Orbit trial has ended." |
orbitUpdate on a group with no trial (eligible or ineligible) |
"GitLab Orbit needs an active trial for this group." |
References
https://gitlab.com/gitlab-org/orbit/-/work_items/19
Closes https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1337
Builds on !258297 (merged), !258545 (merged), and !258586 (merged).
How to set up and validate locally
With a local CustomersDot, in the Rails console:
Feature.enable(:orbit_trial, group)Then, as an Owner of the group:
mutation {
orbitStartTrial(input: { groupPath: "gitlab-org" }) {
errors
group { knowledgeGraphEnabled orbitTrial { state expiresOn } }
}
}Response
{
"data": {
"orbitStartTrial": {
"errors": [],
"group": {
"knowledgeGraphEnabled": true,
"orbitTrial": { "state": "ACTIVE", "expiresOn": "2026-10-31" }
}
}
}
}Demo against a local CustomersDot: an eligible group, start (Orbit turns on), start again (409, same result), a group that CustomersDot rejects (422), a beta group that cannot start a trial, Orbit off after the trial ends, and orbitUpdate that cannot turn it on again.
MR acceptance checklist
See the MR acceptance checklist.
Edited by Jean-Gabriel Doyon