Skip to content

linkerd check sends params on version check#1642

Merged
siggy merged 3 commits intomasterfrom
siggy/cli-version-check
Sep 14, 2018
Merged

linkerd check sends params on version check#1642
siggy merged 3 commits intomasterfrom
siggy/cli-version-check

Conversation

@siggy
Copy link
Member

@siggy siggy commented Sep 14, 2018

The linkerd check parameter hits
https://versioncheck.linkerd.io/version.json to check for the latest
Linkerd version. This loses information, as that endpoint is intended to
record current version, uuid, and source.

Modify linkerd check to set version, uuid, and source
parameters when performing a version check.

Part of #1604.

Signed-off-by: Andrew Seigner [email protected]

The `linkerd check` parameter hits
https://versioncheck.linkerd.io/version.json to check for the latest
Linkerd version. This loses information, as that endpoint is intended to
record current version, uuid, and source.

Modify `linkerd check` to set `version`, `uuid`, and `source`
parameters when performing a version check.

Part of #1604.

Signed-off-by: Andrew Seigner <[email protected]>
@siggy siggy added the area/cli label Sep 14, 2018
@siggy siggy self-assigned this Sep 14, 2018
@siggy siggy requested a review from grampelberg September 14, 2018 00:59
hc.latestVersion = hc.VersionOverride
} else {
hc.latestVersion, err = version.GetLatestVersion()
// The UUID is only known to the web process. At some point we may want
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could put it on an annotation on the control plane namespace object. This would make it easy to retrieve my the cli.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, an annotation on the namespace seems like a better place to store this. I'd like to make that change as part of a larger refactor, to centralize UUID storage/retrieval, and version checking. Filed #1646 to track this.

Copy link
Contributor

@klingerf klingerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐️ Nice work! I agree that in the long run we should come up with a more unified way of determining the UUID -- thanks for opening #1646.

if container.Name == "web" {
for _, arg := range container.Args {
if strings.HasPrefix(arg, "-uuid=") {
uuid = arg[len("-uuid="):]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIOLI, since you're using HasPrefix to check the arg, you might as well use TrimPrefix to strip it.

if strings.HasPrefix(arg, "-uuid=") {
	uuid = strings.TrimPrefix(arg, "-uuid=")
}

Signed-off-by: Andrew Seigner <[email protected]>
@siggy siggy merged commit c3150d2 into master Sep 14, 2018
@siggy siggy deleted the siggy/cli-version-check branch September 14, 2018 22:39
zachalbert added a commit to zachalbert/linkerd2 that referenced this pull request Sep 15, 2018
* master:
  Move more info from the tap table into the expanded row (linkerd#1641)
  `linkerd check` sends params on version check (linkerd#1642)
  Bikeshed the tap and top icons (linkerd#1637)
  Add link to tap each row in top table (linkerd#1643)
  Bump default check retry time to 5 minutes (linkerd#1645)
  Make wait=true a default option for check and dashboard (linkerd#1640)
  Add version check to Grafana dashboard (linkerd#1638)
  Add data plane check for metrics Prometheus (linkerd#1635)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants