Add Metrics Dashboard GraphQL alert queries to FF
What does this MR do and why?
This MR gates the metrics dashboard graphql alert queries behind the remove_monitor_metrics
feature flag. The frontend feature that used this field was actually removed a very long time ago. But we also want to deprecate/remove any API access.
Related issue: Metrics: Delete API entrypoints & helpers (#397138 - closed) (one of many MRs)
Context for removal:
- The Metrics Dashboard feature is being removed in %16.0.
- Feature docs: https://docs.gitlab.com/ee/operations/metrics
- Removal issue: Monitor: Metrics Deprecation and Removal (&10107 - closed)
- Most of the metrics dashboard frontend is currently behind the
remove_monitor_metrics
flag, but the flag has not yet been enabled. It needs to be enabled by default in time for %16.0.- The entire frontend should be behind the flag in order to enable it by default, but the API can merge after - as long as we make all breaking changes within %16.0.
- Rollout issue: https://gitlab.com/gitlab-org/gitlab/-/issues/399248+
- Tracking issue: Metrics: hide deprecated modules behind a featu... (#399231 - closed)
- Enable-by-default MR: Set remove_monitor_metrics flag to true (!119989 - merged)
backend MRs to flag all metrics dashboard endpoints
All related- Add Metrics Dashboard annnotations API to FF (!120286 - merged)
- Add Metrics Dashboard starred dashboard API to FF (!120288 - merged)
- Add Metrics Dashboard templates viewer to FF (!120289 - merged)
- Add Metrics Dashboard environments API to FF (!120299 - merged)
- Add Metrics Dashboard settings API to FF (!120305 - merged)
- Add Metrics Dashboard GraphQL alert queries to FF (!120307 - merged)
- Add Metrics Dashboard embed pipeline to FF (!120310 - merged)
- Add Metrics Dashboard for internal dashboard en... (!120313 - merged)
- Add Metrics Dashboard base API to FF (!120316 - merged)
How to set up and validate locally
** pre-req: project with an environment
- Create a prometheus alert with the right attributes via the rails console
environment = Environment.last project = environment.project payload = JSON.parse({ "labels": { "gitlab_environment_name": environment.name }, "status": "firing", "startsAt": "2021-03-17T11:22:40Z", "annotations": { "title": "Testing that prometheus alerts do not re-acknowledge", "gitlab_y_label": "status" }, "generatorURL": "http://host?g0.expr=up" }.to_json) AlertManagement::ProcessPrometheusAlertService.new(project, payload).execute
- Use
http://gdk.test:3000/-/graphql-explorer
to query for alert details
Query | Response before | Response after |
---|---|---|
|
|
|
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.
Merge request reports
Activity
changed milestone to %16.0
assigned to @syasonik
- A deleted user
added documentation label
1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/api/graphql/reference/index.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Multiversion compatibility
This merge request updates GraphQL backend and frontend code.
To prevent an incident, ensure the updated frontend code is backwards compatible.
For more information, see the multiversion compatibility documentation.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Piotr Skorupa (
@pskorupa
) (UTC+2, 6 hours ahead of@syasonik
)Dylan Griffith (
@DylanGriffith
) (UTC+10, 14 hours ahead of@syasonik
)frontend Laura Meckley (
@lmeckley
) (UTC-6, 2 hours behind@syasonik
)Jose Ivan Vargas (
@jivanvl
) (UTC-6, 2 hours behind@syasonik
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost User-
mentioned in merge request !120286 (merged)
mentioned in merge request !120288 (merged)
mentioned in merge request !120289 (merged)
mentioned in merge request !120299 (merged)
mentioned in merge request !120305 (merged)
mentioned in merge request !120309 (closed)
mentioned in merge request !120310 (merged)
mentioned in merge request !120313 (merged)
mentioned in merge request !120316 (merged)