[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:

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):

Orbit and billing dashboard changes:

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 usedFlowTypes and events fields that take includeNonBillable use @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) use 19.4.0, as the Orbit fields do. This includes the 19.5.0 tag of !260225 (merged).
  • !265553 (merged): the stable branch still has the wallet_agnostic_credits_dashboard flag (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_dashboard on the stable branch (personal_credits_dashboard on master).
  • !260029 (merged): 19.4 has no read_timeout option in the usage client. This MR adds only the pass-through (execute_graphql_query, execute_cdot_graphql, http_post_graphql) and CLICKHOUSE_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 locationId on usage events. The specs keep the 19.4 fields.
  • !266049 (merged): the redaction service also preloads project_namespace for duo_workflow and ai_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.rb fails in every order on the stable branch without it.
  • !265821 (merged): the queries keep the stable @gl_introduced tags; billable and skipReason use 19.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_reason checks; the stable branch has no MCP tool error reasons).
  • Dropped !265619 (merged): it documents the master API after the REST removals and !265594 (merged), which are not backported.
  • Regenerated GraphQL docs, introspection schema, and gitlab.pot with 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
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job 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:

Edited by Jean-Gabriel Doyon

Merge request reports

Loading
Loading