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)
remove_monitor_metrics
flag, but the flag has not yet been enabled. It needs to be enabled by default in time for %16.0.
** pre-req: project with an environment
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
http://gdk.test:3000/-/graphql-explorer
to query for alert detailsQuery | Response before | Response after |
---|---|---|
|
|
|
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.