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

Add git commit hash to version output #599

Closed
rynowak opened this issue Feb 12, 2021 · 5 comments · Fixed by #745
Closed

Add git commit hash to version output #599

rynowak opened this issue Feb 12, 2021 · 5 comments · Fixed by #745
Assignees
Labels
Milestone

Comments

@rynowak
Copy link

rynowak commented Feb 12, 2021

Describe the proposal

We should add the git commit hash to the version output of both dapr --version and daprd --version

As an example here's what kubectl does:

➜ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1", GitCommit:"c4d752765b3bbac2237bf87cf0b1c2e307844666", GitTreeState:"clean", BuildDate:"2020-12-19T07:38:38Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-16T20:43:08Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}

We don't need to adopt JSON as a format - the takeaway here is that you can verify the supply chain of what you're using exactly. This is important for the team doing verification of a release - you can know what version you have exactly.

Release Note

RELEASE NOTE: ADDED git commit hash of cli and runtime to --version output

@mukundansundar
Copy link
Collaborator

@rynowak I agree. This also needs a fix in dapr/dapr repo.

@mukundansundar mukundansundar added this to the v1.2 milestone Apr 3, 2021
@mukundansundar
Copy link
Collaborator

Also consider adding the runtime api version to the output.

@mukundansundar mukundansundar removed this from the v1.2 milestone May 13, 2021
@mukundansundar mukundansundar added this to the v1.3 milestone Jun 3, 2021
@mukundansundar mukundansundar added P2 and removed P1 labels Jun 3, 2021
@dmitsh
Copy link
Contributor

dmitsh commented Jun 22, 2021

/assign

@wcs1only
Copy link
Contributor

I think we need to treat this as a breaking change if we were to change the format of the dapr --version output. Users CI/CD pipelines may already be depending on the current output format.

Perhaps if we were to add a --build-info flag that contained this information in a structured and therefore extendable format?

@wcs1only
Copy link
Contributor

Say I were a customer with a CI/CD script like this:

VERSION=$(dapr --version | awk -F ': ' '/Runtime/ {print $2}')
echo $VERSION

We can't have this change be breaking integrations like this, can we?

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 a pull request may close this issue.

4 participants