[19.4] Reapply the Orbit feature backports
What does this MR do and why?
This MR replaces !265586 (closed) (closed). It has the same changes, plus the bug fix !252164 (merged) (provision add-on purchases when an offline license is created). With it, !266198 (merged) applies as on master, with no adaptation.
Reapplies the Orbit feature backports on 19-4-stable-ee. This MR reverts the revert in !265516 (merged) (merge d9651e807d28), in one commit.
Draft on purpose: merge it only when the release managers give the green light after the patch release. Until then we keep the pipeline green.
It brings back these backports:
- !265286 (merged)
- !265206 (merged)
- !265148 (merged)
- !264912 (merged)
- !264807 (merged)
- !264303 (merged)
- !264304 (merged)
- !264802 (merged)
- !264072 (merged)
It also adds the Orbit changes merged to master since the revert, as the team decided in https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1412#note_4117065140:
19.4 prerequisites of the billing dashboard changes (19.5 already has them):
- Add nonBillableUsage to GitlabSubscriptionUsage
- Show non-billable usage on the GitLab Credits dashboard chart
- Document non-billable usage on GitLab Credits dashboard
- Simplify non-billable usage labels on the credits chart
Orbit and billing dashboard changes:
- Forward access token in Orbit GraphQL status request context
- Send only GQL to Orbit and remove the orbit_gql_queries flag
- Update Orbit default group help text
- test(orbit): cover context and grep service gaps
- Include non-billable usage in GitLab Credits usage by product
- Expose non-billable usage on the personal credits dashboard API
- Expose per-user non-billable credits in the subscription usage API
- Show non-billable usage in GitLab Credits usage by user
- Show non-billable usage on the personal credits dashboard
- Handle ping requests in Orbit MCP server
- Add five Orbit redaction resource types
- Add service ping settings options to orbit
- Add includeNonBillable to the subscription usage events API
- Provision add-on purchases when an offline license is created
- Provision Orbit promo add-on from legacy licenses
- Show non-billable events in the GitLab Credits user drill-down
The backports are in one commit. A second commit tags the non-billable credits fields for rolling upgrades (see the adaptations). !266146 is not merged yet and comes in when it merges.
Adaptations and dropped picks
- Rolling upgrades: the
usedFlowTypesandeventsfields that takeincludeNonBillableuse@gl_introduced(version: "19.4.0"). A 19.4 node that is not upgraded yet then skips them, and the GitLab Credits user page does not fail during a multi-node upgrade. Tested in a browser: https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1477 @gl_introduced: the new credits fields (nonBillableCreditsUsed,nonBillableUsage) use19.4.0, as the Orbit fields do. This includes the19.5.0tag of !260225 (merged).- !265553 (merged): the stable branch still has the
wallet_agnostic_credits_dashboardflag (default on). The non-billable credits are added in the flag-on branch only, and the stable-only flag-on spec expects them. - !265530 (merged): the folder is
user_credits_dashboardon the stable branch (personal_credits_dashboardon master). - !260029 (merged): 19.4 has no
read_timeoutoption in the usage client. This MR adds only the pass-through (execute_graphql_query,execute_cdot_graphql,http_post_graphql) andCLICKHOUSE_QUERY_READ_TIMEOUT. The session credits kill switch and timeout from the same area are not Orbit changes and stay out. - !265819 (merged): 19.4 has no
locationIdon usage events. The specs keep the 19.4 fields. - !266049 (merged): the redaction service also preloads
project_namespaceforduo_workflowandai_catalog_item. The Duo check on the stable branch loads it for each project, so without the preload its query-count specs fail. - !266049 (merged) on 19.4: 19.4 has no EE to-do policy for an expired group SAML session, so the product denies that to-do and the redaction spec expects
false. - Added the spec fix !262144 (merged) (one line,
let_it_be_with_refind):approval_grouped_code_owner_rule_spec.rbfails in every order on the stable branch without it. - !265821 (merged): the queries keep the stable
@gl_introducedtags;billableandskipReasonuse19.4.0. - !264312 (merged): the stable branch has the older default group setting (the newer one came with !257859 (merged)). Its help text "MCP and API calls to Orbit require a namespace to assign usage to." becomes the master text "Usage from Orbit is assigned to this group."
- !261947 (merged): the MCP specs keep the stable style (no
error_reasonchecks; the stable branch has no MCP tool error reasons). - Dropped !265619 (merged): it documents the
masterAPI after the REST removals and !265594 (merged), which are not backported. - Regenerated GraphQL docs, introspection schema, and
gitlab.potwith the stable branch tasks. - Each pick has the same added and removed lines as its original, except the adaptations above.
Check, migrations, and labels
Check. Before the new picks, on every file that the revert changed, this branch was the same as 19-4-stable-ee before the revert merge (git diff d9651e807d28^1 HEAD on those files is empty). The stable-branch CI fix for prepare-as-if-foss-branch stays.
Migrations. This MR adds back 4 migrations (create_knowledge_graph_excluded_namespaces, create_orbit_namespace_enrollments, backfill_orbit_namespace_enrollments_beta, add_repository_storage_to_p_knowledge_graph_code_indexing_tasks) with their master timestamps. An instance that already ran them skips them, because the versions are recorded.
Undercoverage. pipeline:skip-undercoverage is set from the start: the original backports needed it for the same gap as on master.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
- Not applicable: this MR reapplies feature backports that were reverted for the patch release.
- The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
- The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
- Required labels have been applied to this merge request
- severity label and bug subtype labels (if applicable)
- If this MR fixes a bug that affects customers, the customer label has been applied.
- This MR has been approved by a maintainer (only one approval is required).
- Ensure the
e2e:test-on-omnibus-eejob has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.
Note to the merge request author and maintainer
If you have questions about the patch release process, please:
- Refer to the patch release runbook for engineers and maintainers for guidance.
- Ask questions on the
#releasesSlack channel (internal only). - Once the backport has been merged, the commit changes will be automatically deployed to a release environment that can be used for manual validation. See after merging runbook for details.