Refactor EnvironmentsController#metrics_dashboard endpoint
What does this MR do?
The content behind the environment_metrics_show_multiple_dashboards
feature flag has a bug, which blocks the content behind the gfm_embedded_metrics
feature flag from being enabled (as they are currently linear enablements). It's a simpler change to separate the flags than to fix the bug, so separating the flags can allow us to take the time to fix the original bug correctly & still ship the embedding features to users quickly.
Sub item: The environment_metrics_use_prometheus_endpoint
feature flag is also ready to be enabled, but it is an unnecessary dependency for gfm_embedded_metrics
as well, so eliminating that check from the metrics_dashboard endpoint will simplify enablements.
Blocking bug: https://gitlab.com/gitlab-org/gitlab-ce/issues/64481
Blocked embedding metrics work: https://gitlab.com/gitlab-org/gitlab-ce/issues/30423
Does this MR meet the acceptance criteria?
Conformity
- [n/a] Changelog entry
- [n/a] Documentation created/updated or follow-up review issue created
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team