Skip to content

[Bug]: dashboard failed to create #23752

@xzxiong

Description

@xzxiong

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

f9ec289

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

dashboard 创建参数错误

Image
=== RUN   TestCreateK8SDashboard
--- FAIL: TestCreateK8SDashboard (1.13s)
panic: runtime error: index out of range [2] with length 2 [recovered, repanicked]

goroutine 21 [running]:
testing.tRunner.func1.2({0x8d1400, 0xc0003cc090})
	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1872 +0x237
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1875 +0x35b
panic({0x8d1400?, 0xc0003cc090?})
	/opt/hostedtoolcache/go/1.25.7/x64/src/runtime/panic.go:783 +0x132
github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard.(*DashboardCreator).getMultiHistogram(0xc000174480, {0xc00019dcd0, 0x2, 0x4040000040400000?}, {0xc00019dcb0, 0x2, 0x2}, {0xc00019dbb8, 0x4, 0x4}, ...)
	/home/runner/work/ob-ops/ob-ops/pkg/util/metric/v2/dashboard/grafana_dashboard.go:405 +0x5c6
github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard.(*DashboardCreator).initTxnStarcountRow(0xc000174480)
	/home/runner/work/ob-ops/ob-ops/pkg/util/metric/v2/dashboard/grafana_dashboard_txn.go:253 +0x637
github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard.(*DashboardCreator).initTxnDashboard(0xc000174480)
	/home/runner/work/ob-ops/ob-ops/pkg/util/metric/v2/dashboard/grafana_dashboard_txn.go:56 +0x170
github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard.(*DashboardCreator).Create(0xc000174480)
	/home/runner/work/ob-ops/ob-ops/pkg/util/metric/v2/dashboard/grafana_dashboard.go:143 +0x1c
github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard.TestCreateK8SDashboard(0xc000103180)
	/home/runner/work/ob-ops/ob-ops/pkg/util/metric/v2/dashboard/grafana_dashboard_test.go:15 +0x10d
testing.tRunner(0xc000103180, 0x938f40)
	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1934 +0xea
created by testing.(*T).Run in goroutine 1
	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1997 +0x465
exit status 2
FAIL	github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard	1.141s

Expected Behavior

No response

Steps to Reproduce

run ut

cd ./pkg/util/metric/v2/dashboard
go test -v -run TestCreateK8SDashboard

Additional information

No response

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions