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

Introduce a more graceful way to check labels #843

Merged
merged 5 commits into from
Oct 19, 2020

Conversation

lucklove
Copy link
Member

Fix #838

Signed-off-by: lucklove gnu.crazier@gmail.com

What problem does this PR solve?

For imported clusters, it will report missing label when executing tiup cluster display since the server.labels is missing in meta.yaml.
屏幕快照 2020-10-15 下午8 49 26

What is changed and how it works?

Read labels config from PD server instead of meta.yaml.
屏幕快照 2020-10-15 下午8 50 22

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

Fix pingcap#838

Signed-off-by: lucklove <gnu.crazier@gmail.com>
@codecov-io
Copy link

codecov-io commented Oct 15, 2020

Codecov Report

Merging #843 into master will increase coverage by 0.11%.
The diff coverage is 69.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #843      +/-   ##
==========================================
+ Coverage   52.99%   53.10%   +0.11%     
==========================================
  Files         261      261              
  Lines       18987    19014      +27     
==========================================
+ Hits        10062    10098      +36     
+ Misses       7367     7357      -10     
- Partials     1558     1559       +1     
Flag Coverage Δ
#cluster 45.06% <69.04%> (+0.24%) ⬆️
#dm 25.30% <0.00%> (+0.02%) ⬆️
#integrate 47.98% <69.04%> (+0.19%) ⬆️
#playground 22.17% <0.00%> (-0.06%) ⬇️
#tiup 10.78% <0.00%> (-0.03%) ⬇️
#unittest 20.94% <66.66%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cluster/manager.go 66.03% <25.00%> (-0.01%) ⬇️
pkg/cluster/api/pdapi.go 53.84% <66.66%> (+2.55%) ⬆️
pkg/cluster/spec/spec.go 87.84% <70.00%> (-0.73%) ⬇️
pkg/cluster/spec/validate.go 95.41% <84.61%> (+1.90%) ⬆️
pkg/cluster/api/dmapi.go 60.00% <0.00%> (+1.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ea9f5b...a72ee2f. Read the comment docs.

@lucklove lucklove added type/bug-fix Categorizes PR as a bug-fix status/PTAL labels Oct 15, 2020
@lucklove lucklove self-assigned this Oct 15, 2020
@lucklove lucklove added this to the v1.2.1 milestone Oct 15, 2020
pkg/cluster/spec/spec.go Outdated Show resolved Hide resolved
pkg/cluster/spec/spec.go Outdated Show resolved Hide resolved
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 19, 2020
@lucklove lucklove merged commit 5ff2aed into pingcap:master Oct 19, 2020
@lucklove lucklove deleted the labels branch October 19, 2020 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1. type/bug-fix Categorizes PR as a bug-fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tiup doesn't handle the label setting when import from ansible inventory.ini
4 participants