Add the deployment count to the GraphQL API
What does this MR do and why?
This MR exposes the deployment count flow metric via GraphQL. The previous implementation was exposed via private APIs, at some point we can remove the following classes:
lib/gitlab/cycle_analytics/summary/deploy.rb
ee/lib/gitlab/analytics/cycle_analytics/summary/group/deploy.rb
How does sit work?
- On the project level (foss), it invokes the
DeploymentsFinder
. - On the project/group levels (licensed), it invokes the
DORA
API.
How to set up and validate locally
Make sure you have ultimate license (for the group-level):
query projectLevel {
project(fullPath: "gitlab-org/gitlab-shell") {
name
flowMetrics {
deploymentCount(from: "2022-01-01", to: "2022-03-01") {
value
title
}
}
}
}
query groupLevel {
group(fullPath: "gitlab-org") {
name
flowMetrics {
deploymentCount(from: "2022-01-01", to: "2022-03-01") {
value
title
}
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #387162 (closed)
Edited by Adam Hegyi