Skip to content

Commit

Permalink
Release v2021.08.26.2 (#997) [skip pd_pr]
Browse files Browse the repository at this point in the history
* tweak: add fallback to keep compatibility in scenarios without inject distro info (#976)

* update: release version
  • Loading branch information
shhdgit authored Sep 2, 2021
1 parent 29034af commit e723204
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 24 deletions.
1 change: 0 additions & 1 deletion cmd/tidb-dashboard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import (
keyvisualregion "github.com/pingcap/tidb-dashboard/pkg/keyvisual/region"
"github.com/pingcap/tidb-dashboard/pkg/swaggerserver"
"github.com/pingcap/tidb-dashboard/pkg/uiserver"
_ "github.com/pingcap/tidb-dashboard/pkg/utils/distro/populate"
"github.com/pingcap/tidb-dashboard/pkg/utils/version"
)

Expand Down
11 changes: 10 additions & 1 deletion pkg/utils/distro/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ func Replace(distro introData) {
}

func Data(k string) string {
d := data.Load().(introData)
var d introData
atomd := data.Load()
// we need a fallback to keep compatibility in scenarios without inject distro info
// related issue: https://github.com/pingcap/tidb-dashboard/issues/975
if d == nil {
d = Resource
} else {
d = atomd.(introData)
}

if d[k] == "" {
return k
}
Expand Down
21 changes: 0 additions & 21 deletions pkg/utils/distro/populate/populate.go

This file was deleted.

2 changes: 1 addition & 1 deletion release-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file specifies the TiDB Dashboard internal version, which will be printed in `--version`
# and UI. In release branch, changing this file will result in publishing a new version and tag.
2021.08.26.1
2021.08.26.2

0 comments on commit e723204

Please sign in to comment.