-
Notifications
You must be signed in to change notification settings - Fork 382
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
Missing vX.Y.Z tags cause wrong version report #1688
Comments
I noticed that problem in a series of issues in the OKD repository, but I'm not familiar with tags, so I'm unable to properly troubleshoot what commit introduced this bug. Are you @krouma ? |
This is not a problem of the code, so there's no commit to pinpoint. The tags probably exist only in private repos and are not synchronized here. |
Do you mean these tags? |
Yes, but those that are present have wrong format. |
Then will this solve the issue? -SOURCE_GIT_TAG ?=$(shell git describe --long --tags --abbrev=7 --match 'v[0-9]*' || echo 'v0.0.0-unknown-$(SOURCE_GIT_COMMIT)')
+SOURCE_GIT_TAG ?=$(shell git describe --long --tags --abbrev=7 --match 'openshift-clients-*' | sed 's/openshift-clients-/v/g' || echo 'v0.0.0-unknown-$(SOURCE_GIT_COMMIT)')
# Input: openshift-clients-4.15.0-202402082307
# Output: v4.15.0-202402082307 |
I guess it would |
Update `SOURCE_GIT_TAG` parsing logic to correctly identify the new tag format: `openshift-clients-<version>`. It fixes openshift#1688, openshift#744, openshift#740. Previously, it incorrectly returned `v4.2.0-alpha.0` for all releases.
Update `SOURCE_GIT_TAG` parsing logic to correctly identify the new tag format: `openshift-clients-<version>`. It fixes openshift#1688, openshift#744, openshift#740. Previously, it incorrectly returned `v4.2.0-alpha.0` for all releases.
Update `SOURCE_GIT_TAG` parsing logic to correctly identify the new tag format: `openshift-clients-<version>`. It fixes openshift#1688, openshift#744, openshift#740. Previously, it incorrectly returned `v4.2.0-alpha.0` for all releases.
I've just created a PR. Do you have the bandwidth to check if that branch fixes this problem? I'm confused as to how to build it from source to do so myself. If so, a PR review will be appreciated. |
Thank you so much for taking a look at this @codespearhead 👍 |
Update `SOURCE_GIT_TAG` parsing logic to correctly identify the new tag format: `openshift-clients-<version>`. It fixes openshift#1688, openshift#744, openshift#740. Previously, it incorrectly returned `v4.2.0-alpha.0` for all releases.
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/lifecycle frozen |
Hi, I successfully built the
oc
tool from source, but when I runoc version
it reportsClient Version: v4.2.0-alpha.0-1997-g0c63f9d
. However, I am at the tagopenshift-clients-4.14.0-202310201027
.I looked for the cause and found that during
make oc
, the commandgit describe --long --tags --abbrev=7 --match 'v[0-9]*' || echo 'v0.0.0-unknown-$(SOURCE_GIT_COMMIT)'
is run. It looks for the latest tag inv<version>
format. However, the last tag, that satisfies this format, isv4.2.0-alpha.0
.I know I can get around this by setting
SOURCE_GIT_TAG
orOS_GIT_VERSION
tov4.14.0
, but for me the correct solution seems to be adding appropriate tags to make the auto-detection work.The text was updated successfully, but these errors were encountered: