-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
internal/*: define ImageVersion, which is set to the most recent #4083
internal/*: define ImageVersion, which is set to the most recent #4083
Conversation
var ( | ||
Version = "unknown" | ||
GitVersion = "unknown" | ||
GitCommit = "unknown" | ||
KubernetesVersion = "unknown" | ||
GoVersion = fmt.Sprintf("%s %s/%s", runtime.Version(), runtime.GOOS, runtime.GOARCH) |
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.
GoVersion
contains redundant information (GOOS and GOARCH are already printed by the version
subcommand) so I removed it in favor of calling runtime.Version()
directly.
Relates to #4061 |
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.
Hi @estroz,
Could you please rebase it with the master and push to re-trigger the tests?
It shows fine for me 👍 .
of operator-sdk repo tag or release commit's future tag. This variable is consumed by ansible-operator, helm-operator, and scorecard plugins Makefile: set IMAGE_VERSION to v1.1.0, and set ImageVersion in ldflags internal/version: removed GoVersion in favor of using runtime.Version() in dependent packages
df82397
to
cc5d27e
Compare
…rator-framework#4083) of operator-sdk repo tag or release commit's future tag. This variable is consumed by ansible-operator, helm-operator, and scorecard plugins Makefile: set IMAGE_VERSION to v1.1.0, and set ImageVersion in ldflags internal/version: removed GoVersion in favor of using runtime.Version() in dependent packages Signed-off-by: reinvantveer <[email protected]>
Description of the change:
Motivation for the change: samples generated for a release commit will have incorrect versions, specifically the major+minor version preceding the soon-to-be-released version, in the current release setup because these versions depend on a release's git tag which has not been created yet. Setting this version explicitly in the Makefile breaks this cycle, allowing samples to be generated with a version that has not been released yet; these will still pass e2e tests because image tags are substituted anyway.
This PR makes no user-facing changes (except changing the
operator-sdk version
output string, which I would consider a bugfix and can add a fragment if desired).Closes #4061
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs