Templating: Failed to upgrade legacy queries Datasource was not found

Hi,

After upgrading to version 10.2.2 ( from 9.4.x), I am getting error 'Templating: Failed to upgrade legacy queries Datasource was not found" when loading a dashboard. In this dashboard I have two datasources, the second one uses regex of the first one. I have tried deleting the dashboard and importing it again to assign a new UID. Also deleted the datasources (bcnc-ocpbt and bcnc-ocpbp) and created new ones.
Any advice ?

Datasources

{
    "id": 39,
    "uid": "c3fe0c74-bae5-40db-96e3-44aa06661008",
    "orgId": 1,
    "name": "bcnc-ocpbp",
    "type": "prometheus",
    "typeName": "Prometheus",
    "typeLogoUrl": "/public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
    "access": "proxy",
    "url": "XXXXXXXXXXXXXXX",
    "user": "",
    "database": "",
    "basicAuth": true,
    "isDefault": false,
    "jsonData": {
      "httpMethod": "POST",
      "oauthPassThru": false,
      "sigV4Auth": false,
      "tlsSkipVerify": true
    },
    "readOnly": false
  },
  {
    "id": 40,
    "uid": "f32d5b7b-3d96-420f-8ced-e5307da51ed5",
    "orgId": 1,
    "name": "bcnc-ocpbt",
    "type": "prometheus",
    "typeName": "Prometheus",
    "typeLogoUrl": "/public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
    "access": "proxy",
    "url": "XXXXXXXXXXXXXXX",
    "user": "",
    "database": "",
    "basicAuth": true,
    "isDefault": false,
    "jsonData": {
      "httpMethod": "POST",
      "oauthPassThru": false,
      "sigV4Auth": false,
      "tlsSkipVerify": true
    },
    "readOnly": false
  },
  {
    "id": 5,
    "uid": "P2BE2660C7C3A6879",
    "orgId": 1,
    "name": "ocpbp",
    "type": "prometheus",
    "typeName": "Prometheus",
    "typeLogoUrl": "/public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
    "access": "proxy",
    "url": "XXXXXXXXXXXXXXX",
    "user": "",
    "database": "",
    "basicAuth": false,
    "isDefault": false,
    "jsonData": {
      "esVersion": 0,
      "httpHeaderName1": "Authorization",
      "httpMethod": "POST",
      "nodeGraph": {},
      "search": {},
      "serviceMap": {},
      "timeInterval": "30s",
      "tlsSkipVerify": true,
      "tracesToLogs": {}
    },
    "readOnly": false
  },
  {
    "id": 32,
    "uid": "l2-BhJ94z",
    "orgId": 1,
    "name": "ocpbt",
    "type": "prometheus",
    "typeName": "Prometheus",
    "typeLogoUrl": "/public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
    "access": "proxy",
    "url": "XXXXXXXXXXXXXXX",
    "user": "",
    "database": "",
    "basicAuth": false,
    "isDefault": false,
    "jsonData": {
      "esVersion": 0,
      "httpHeaderName1": "Authorization",
      "httpMethod": "POST",
      "nodeGraph": {},
      "search": {},
      "serviceMap": {},
      "timeInterval": "30s",
      "tlsSkipVerify": true,
      "tracesToLogs": {}
    },
    "readOnly": false
  },

Templating in dashboard

  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "ocpbt",
          "value": "l2-BhJ94z"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Cluster",
        "multi": false,
        "name": "OCP_DS",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "/^(ocpbt|ocpbp|ocpct|ocpcp).*/",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": false,
          "text": "No data sources found",
          "value": ""
        },
        "hide": 2,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "DS_PROMETHEUS",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "/^bcnc-${OCP_DS}/",
        "skipUrlSync": false,
        "type": "datasource"
      },

I have the same problem friend.

I have the same issue moving my 1 of my dashboards to a new grafana server. The dashboard that is failing is a complicated one with the Acache EChart plugin. My other dashboards work fine on the new server, but they do not use any plug-ins

How are you doing this move?