-
Notifications
You must be signed in to change notification settings - Fork 316
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
cluster: Remove duplicate display of dashboard URLs #2502
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @xhebox |
@@ -844,9 +844,5 @@ func (m *Manager) displayDashboards(ctx context.Context, t *spec.Specification, | |||
} | |||
} | |||
|
|||
if m.logger.GetDisplayMode() != logprinter.DisplayModeJSON || j == nil { | |||
fmt.Printf("Dashboard URLs: %s\n", strings.Join(dashboardAddrs, ",")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a new function that can display multiple dashboard address(dashboard_servers). So it is invalid to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there should be an if len(dashboardAddrs) > 1
around it instead? And then also a if len(dashboardAddrs) == 1
before line 836 ?
Also, does it use the right scheme
if there are multiple?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated this to check for the length of dashboardAddrs
.
PTAL @xhebox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, LGTM. But I don't know if it is wanted or not.
It is a new feature but Dashboard URL: xxx
is an old feature. There are compatibility issues.
This feature is asked by the team of @sydpz, PTAL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about displaying multiple dashboard URLs in Dashboard URL
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about displaying multiple dashboard URLs in
Dashboard URL
?
I've considered, and I think it will break existed applications. For example, the team of TEM does rely on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the output or in the json structure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output, of course. I did not modify json structure, iirc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't humans rely on the human readable output and programs on the machine readable json? Maybe even over a REST interface instead of by calling a command.
Shouldn't TEM be modified to follow the output of tiup?
Another option would be to do something like git with Porcelain and Plumbing. Or something like --output v1
...
For now I'm also ok with just closing this. It isn't that important.
7e2a86e
to
949dfa5
Compare
What problem does this PR solve?
Note the two lines with
Dashboard URL
here:Related: #2472
What is changed and how it works?
Check List
Tests
Now only one line in the output:
Dashboard URL: http://192.168.122.196:2379/dashboard
Release notes: