-
Notifications
You must be signed in to change notification settings - Fork 17
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
[version] Display version when booting operator #350
[version] Display version when booting operator #350
Conversation
07a77db
to
3ce35fc
Compare
3ce35fc
to
5bc5018
Compare
@krnowak I did not understand the part where you are saying
|
5bc5018
to
3d2afc5
Compare
@surajssd: Basically, when doing a release of the operator, we want to make sure that the version it prints is something like |
3d2afc5
to
dc8ff10
Compare
this is done :-) |
hack/publish-release.sh
Outdated
@@ -28,7 +28,7 @@ main() { | |||
echo "Script is running in dry run mode. Following commands will be executed if you pass the -r or --run flag:" | |||
fi | |||
|
|||
run make image | |||
run make VERSION=$(git describe --abbrev=0 --tags) image |
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.
What I actually meant is to see if the operator, after being built without overriding the VERSION
Make variable, prints a version like 0.7.2
without commit checksum or "dirty" string. The reason is to guard against building the operator from the dirty tree or from untagged commit by accident.
But this kind of check might be hard/annoying to execute… So I just got an idea that you could add a rule to Makefile like:
print-version:
@echo $(VERSION)
and then, in this script, right after the readonly VERSION="v$(cat VERSION)"
line, you could compare the output of make print-version
with the VERSION
variable. If they are different, bail out.
What do you think?
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.
@krnowak is this check needed? Because this will be only called from hack/publish-release.sh
which makes sure that the directory is setup properly and then binary build happens?
dc8ff10
to
9f347c7
Compare
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.
One nit, otherwise LFAD.
Operator shows it's version when it starts. This version information is embedded inside the binary while building it. It is a good practice to show the operator version when it is booting up, helps while resolving/reporting issues even if the latest/untagged docker image is run by the user. Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
545fc9e
to
a173b59
Compare
LFAD if tests pass. |
Operator shows it's version when it starts. This version information
is embedded inside the binary while building it. It is a good
practice to show the operator version when it is booting up.
Fixes #348