Skip to content

Remove dead permissions code for MetricsDashboard::Annotations

Sarah Yasonik requested to merge sy-rm-monitor-metrics-31 into master

What does this MR do and why?

Changes: Removes the read/admin permissions for metrics_dashboard_annotations, as those features have been removed.

Context: This MR cleans up a portion of dead code related to the removal of devopsmonitor Category:Metrics features. The Metrics Dashboard & Prometheus Metrics/Alerts (used for monitoring apps deploying using gitlab) were deprecated in 14.7 and removed from the product in 16.0.

Dummy mutation

mutation CreateAnnotation {
  createAnnotation(input: {
    startingAt: "2024-02-15T22:37:40.958Z",
    dashboardPath: "apple/pie",
    description: "pumpkinn pie"
  }) {
    errors
  }
}

API Response before

{
  "errors": [
    {
      "message": "The resource that you are attempting to access does not exist or you don't have permission to perform this action",
      "locations": [
        {
          "line": 15,
          "column": 3
        }
      ],
      "path": [
        "createAnnotation"
      ]
    }
  ],
  "data": {
    "createAnnotation": null
  }
}

API response after

{
  "errors": [
    {
      "message": "The resource that you are attempting to access does not exist or you don't have permission to perform this action",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "createAnnotation"
      ]
    }
  ],
  "data": {
    "createAnnotation": null
  }
}

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah Yasonik

Merge request reports

Loading