Geo Registry API: Add data-management-details-path

What does this MR do and why?

Part of #577986 (closed)
Backend for Geo: Create link between registry and model (!221550 - merged)
Part of this change is behind a feature flag :geo_primary_verification_view

This change adds a new field (data_management_details_path) to the Geo Registries API. This field will generate a path to the Data Management UI where the Model being replicated by the registry is visualized.

We build this URL in the API so that we can use Rails as our SSoT for the URL in respect to our recently updated guidance on URLs in GitLab.

Screenshots or screen recordings

Before After
Before after

How to set up and validate locally

Setup Geo (optional)

Important: To properly test Geo you will need a separate GDK setup. Setup is straightforward but takes some time. Another option is to validate the code functionally and if needed schedule a call to sync and I can screen share my instance.

  1. Ensure no other GDKs are running. gdk stop/gdk kill
  2. Open an empty directory and install and run Geo with the one-line command found on the Easy installation instructions
  3. Access your primary and secondary Geo instances via 127.0.0.1:3000 and 127.0.0.1:3001.

Testing

  1. Enable the feature flag Feature.enable(:geo_primary_verification_view)
  2. Open the GraphiQL explorer (http://127.0.0.1:3000/-/graphql-explorer)
  3. Add a custom header REQUEST_PATH with the value /api/v4/geo/node_proxy/{node_id}/graphql
  4. Execute the query and ensure dataManagementDetailsPath is present
Expand for example GraphQL Query

Query

query {
  geoNode {
    projectRepositoryRegistries {
      nodes {
        id
        modelRecordId
        dataManagementDetailsPath
      }
    }
  }
}

Headers

{
  "REQUEST_PATH": "/api/v4/geo/node_proxy/2/graphql"
}
Edited by Zack Cuddy

Merge request reports

Loading