Skip to content

Implement feature-flagged GraphQL end-point for data transfer monitoring

What does this MR do and why?

Epic: Expose transferred git (egress) data via API (&9330) Problem

We don't have a public API to expose the transferred data. Requirements Design of the page

Design a new Transfer Page (#355976)

Screenshots or screen recordings

this is are the fields that we introduced to the schema.

For projects:

query ProjectDataTransfer {
  project(fullPath: "gnuwget/Wget2") {
    dataTransfer { # ProjectDatatransferType
      totalEgress # BigInt
      egressNodes { # EgressNodeType.connection_type
        nodes {
          date # String
          totalEgress # BigInt
          repositoryEgress # BigInt
          artifactsEgress # BigInt
          packagesEgress # BigInt
          registryEgress # BigInt
        }
      }
    }
  }
}

For groups:

query ProjectDataTransfer {
  group(fullPath: "gnuwget") {
    dataTransfer { # ProjectDatatransferType
      egressNodes { # EgressNodeType.connection_type
        nodes {
          date # String
          totalEgress # BigInt
          repositoryEgress # BigInt
          artifactsEgress # BigInt
          packagesEgress # BigInt
          registryEgress # BigInt
        }
      }
    }
  }
}

How to set up and validate locally

  1. Enable the the feature-flag
    Feature.enable(:data_transfer_monitoring)
  2. go to graphql-explorer http://127.0.0.1:3000/-/graphql-explorer
  3. try the queries above

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #383773

Edited by Patrick Cyiza

Merge request reports