Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2020.10.21.1 #774

Merged
merged 3 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/keyvisual/matrix/axis.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (c *chunk) Reduce(newKeys []string) chunk {
endKeys := newKeys[1:]
j := 0
for i, value := range c.Values {
if equal(keys[i], endKeys[j]) {
if i > 0 && equal(keys[i], endKeys[j]) {
j++
}
newValues[j] += value
Expand Down
28 changes: 28 additions & 0 deletions pkg/keyvisual/matrix/axis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,31 @@ import (
var _ = Suite(&testAxisSuite{})

type testAxisSuite struct{}

func (s *testAxisSuite) TestChunkReduce(c *C) {
testcases := []struct {
keys []string
values []uint64
newKeys []string
newValues []uint64
}{
{
[]string{"", "a", "b", "c", ""},
[]uint64{1, 10, 100, 1000},
[]string{"", "b", ""},
[]uint64{11, 1100},
},
{
[]string{"", "a", "b", "c", ""},
[]uint64{1, 10, 100, 1000},
[]string{"", ""},
[]uint64{1111},
},
}

for _, testcase := range testcases {
originChunk := createChunk(testcase.keys, testcase.values)
reduceChunk := originChunk.Reduce(testcase.newKeys)
c.Assert(reduceChunk.Values, DeepEquals, testcase.newValues)
}
}
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.
2020.09.21.1
2020.10.21.1
2 changes: 1 addition & 1 deletion ui/dashboardApp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function main() {
} catch (e) {
Modal.error({
title: 'Failed to connect to TiDB Dashboard server',
content: e.stack,
content: '' + e,
okText: 'Reload',
onOk: () => window.location.reload(),
})
Expand Down