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

Expose /api/version from gui #4312

Closed
jsoref opened this issue Sep 11, 2020 · 4 comments
Closed

Expose /api/version from gui #4312

jsoref opened this issue Sep 11, 2020 · 4 comments
Labels
component:ui User interfaces bugs and enhancements enhancement New feature or request help wanted Extra attention is needed

Comments

@jsoref
Copy link
Member

jsoref commented Sep 11, 2020

Summary

https://cd.apps.argoproj.io/api/version exists and actually has interesting/important information

Motivation

especially the helm version, as some things require helm 3.3.1+.

Proposal

One way to expose the version info would be from the octopus/version field at the top left:

image

@jsoref jsoref added the enhancement New feature or request label Sep 11, 2020
@jessesuen
Copy link
Member

I agree

@jessesuen jessesuen added component:ui User interfaces bugs and enhancements help wanted Extra attention is needed labels Sep 14, 2020
@tetchel
Copy link
Contributor

tetchel commented Sep 15, 2020

I can look into this.

Some details:

  1. If the version-string becomes clickable, eg to open a modal with all this info, should the current tooltip which shows the full current version stay? Or should we remove it to encourage clicking?
  2. In the modal, do we want to show all that info, or just select pieces?

Here is the full output from my dev environment:

{
  "Version": "v1.7.0+d4ddd51",
  "BuildDate": "2020-09-15T18:09:38Z",
  "GitCommit": "d4ddd51602a3398bbe23ff8fb4fee63aac3ae743",
  "GitTreeState": "clean",
  "GoVersion": "go1.14.1",
  "Compiler": "gc",
  "Platform": "linux/amd64",
  "KsonnetVersion": "v0.13.1",
  "KustomizeVersion": "{Version:kustomize/v3.8.1 GitCommit:0b359d0ef0272e6545eda0e99aacd63aef99c4d0 BuildDate:2020-07-16T00:58:46Z GoOs:linux GoArch:amd64}",
  "HelmVersion": "version.BuildInfo{Version:\"v3.3.1\", GitCommit:\"249e5215cde0c3fa72e27eb7a30e8d55c9696144\", GitTreeState:\"clean\", GoVersion:\"go1.14.7\"}",
  "KubectlVersion": "v1.17.8",
  "JsonnetVersion": "v0.16.0"
}

@jsoref
Copy link
Member Author

jsoref commented Sep 15, 2020

I've discovered that the information for things, esp helm version can vary between components (argocd-server vs argocd-repo-server), so a right anchored object ala https://cd.apps.argoproj.io/applications/cert-manager?resource=&conditions=true would be good.

I think the whole thing in a pretty form w/ a cute 📋 button to copy JSON.

As for the tooltip, I'm fine w/ keeping that, but it'd probably also be ok to lose it.

@tetchel
Copy link
Contributor

tetchel commented Sep 17, 2020

Currently the Kustomize and Helm versions are stringified JSON objects in slightly different forms (note both versions don't quote the values, so it's not actually parseable). The CLI reports these versions exactly as pasted in my previous comment in argocd version too.

I think as part of this PR I would like to parse these versions on the server-side and turn them into a user-friendly form. If it's OK, I will probably use the same version format that ArgoCD uses with the version, +, and first 8 characters of commit.

  "KustomizeVersion": "v3.8.1+0b359d0"
  "HelmVersion": "v3.3.1+249e521"

edit: The helm version is as above, the Kustomize version has the build date instead. These are what is given by helm/kustomize version --short. The parsing of the almost-JSON was too nasty for me to stomach so I kept it simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:ui User interfaces bugs and enhancements enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants