Can not Compare versions or Restore

Recently, I have migrate grafana from Linux to k8s, i migrate data from sqlite to mysql refer to: “community.grafana.com/t/migrating-grafana-data-to-new-database/2454”
everything looks fine!
But when i want see ‘Compare versions’ in Dashboard’s setting, will error:
‘Internal Server Error - Check the Grafana server logs for the detailed error message.’

Here is the log:

t=2020-09-23T15:06:15+0000 lvl=eror msg=“Request error” logger=context userId=1 orgId=1 uname=admin error=“runtime error: invalid memory address or nil pointer dereference” stack="/usr/local/go/src/runtime/panic.go:212 (0x4530a9)\n/usr/local/go/src/runtime/signal_unix.go:695
(0x452ef8)\n/root/project/pkg/components/dashdiffs/formatter_basic.go:189 (0x145c047)\n/root/project/pkg/components/dashdiffs/formatter_basic.go:85 (0x145bd20)\n/root/project/pkg/components/dashdiffs/compare.go:108 (0x145b4ad)\n/root/project/pkg/api/dashboard.go:485 (0x14b2d9
1)\n/usr/local/go/src/reflect/value.go:460 (0x49d14a)\n/usr/local/go/src/reflect/value.go:321 (0x49c653)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:177 (0x975d7b)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-2016062717
0012-d8a0b8677191/inject.go:137 (0x975759)\n/root/project/pkg/api/common.go:37 (0x14f90dd)\n/usr/local/go/src/reflect/value.go:460 (0x49d14a)\n/usr/local/go/src/reflect/value.go:321 (0x49c653)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/i
nject.go:177 (0x975d7b)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:137 (0x975759)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:121 (0x976d08)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:112 (0x143e24c)\n/
root/project/pkg/middleware/request_tracing.go:25 (0x143e23f)\n/usr/local/go/src/reflect/value.go:460 (0x49d14a)\n/usr/local/go/src/reflect/value.go:321 (0x49c653)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:177 (0x975d7b)\n/roo
t/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:137 (0x975759)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:121 (0x976d08)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:112 (0x143da20)\n/root/project/pkg/middleware/r
equest_metrics.go:36 (0x143da0b)\n/usr/local/go/src/reflect/value.go:460 (0x49d14a)\n/usr/local/go/src/reflect/value.go:321 (0x49c653)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:177 (0x975d7b)\n/root/go/pkg/mod/github.com/go-ma
caron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:137 (0x975759)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:121 (0x976d08)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:112 (0x143d8d2)\n/root/project/pkg/middleware/recovery.go:160 (0x143d8c5)\n/
root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:79 (0x976bb0)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x975aa7)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x97
5848)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:121 (0x976d08)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/context.go:112 (0x143ac5b)\n/root/project/pkg/middleware/logger.go:34 (0x143ac46)\n/usr/local/go/src/reflect/value.go:460 (0x49d14a)\n/usr/local/go/src/re
flect/value.go:321 (0x49c653)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:177 (0x975d7b)\n/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:137 (0x975759)\n/root/go/pkg/mod/gopkg.in/macar
on.v1@v1.3.4/context.go:121 (0x976d08)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/router.go:187 (0x987c96)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/router.go:294 (0x98264d)\n/root/go/pkg/mod/gopkg.in/macaron.v1@v1.3.4/macaron.go:220 (0x97baaa)\n/usr/local/go/src/net/htt
p/server.go:2807 (0x706172)\n/usr/local/go/src/net/http/server.go:1895 (0x701beb)\n/usr/local/go/src/runtime/asm_amd64.s:1373 (0x46f240)\n"
t=2020-09-23T15:06:15+0000 lvl=eror msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=POST path=/api/dashboards/calculate-diff status=500 remote_addr=10.1.228.145 time_ms=68 size=122 referer="${path}/d/qoS197ZGz/grafana-metrics?e
ditview=versions&orgId=1"

My Grafana version is v7.0.3

and here is my Deployment config:
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: monitoring
labels:
app: grafana
spec:
replicas: 0
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: registry-vpc.cn-beijing.aliyuncs.com/yfdtest/grafana:v3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: grafana
env:
- name: GF_SECURITY_ADMIN_USER
value: admin
- name: GF_SECURITY_ADMIN_PASSWORD
value: ${password}
readinessProbe:
failureThreshold: 10
httpGet:
path: /api/health
port: 3000
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 30
livenessProbe:
failureThreshold: 3
httpGet:
path: /api/health
port: 3000
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: 300m
memory: 1Gi
requests:
cpu: 300m
memory: 1Gi
volumeMounts:
- mountPath: /etc/grafana
name: grafana-config
- mountPath: /etc/grafana/ldap
name: ldap-config
securityContext:
fsGroup: 472
runAsUser: 472
volumes:
- name: grafana-config
configMap:
defaultMode: 0644
name: grafana-config
- name: ldap-config
configMap:
defaultMode: 0644
name: ldap-config

I have no idea about what is wrong…

and when i try to Restore one history version,will show “Dashboard title cannot be empty”

The log is:
t=2020-09-23T15:15:19+0000 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=POST path=/api/dashboards/id/385/restore status=400 remote_addr=10.1.228.145 time_ms=17 size=45 referer=“http://grafana.zhenguanyu.com/d/qoS197ZGz/grafana-metrics?ed
itview=versions&orgId=1”

Maybe because of the data migrate…
When i change the Dashboard after migration, i can see the ‘Compare versions’ and ‘restore’ it successful.