-
Notifications
You must be signed in to change notification settings - Fork 99
Remove v prefix from appVersion #279
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
Conversation
|
Ha. On #277 (comment) I wrote:
So.. you're saying we already do this:
OK. Where is that logic? And while answering this question we found that it's not there:
Was removed here: Edit: Only now I look at the patch and see that you have re-added that logic here. Ha! :) |
| # Note(JP): this currently defines the default `tag` value in a k8s | ||
| # image specification, and therefore must currently be v-prefixed. | ||
| appVersion: "v25.3.0-rc.1" | ||
| # image specification. A "v" is prefixed in our template helpers to ensure constency. |
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.
"consistency".
can do after merge.
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.
Can we change the comment to say:
This is used to construct the default
tagvalue for the k8s
image specification (with a "v" is prefixed to this value), see
_helpers.tpl.
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.
Done now since we have the issue below.
| else | ||
| VERSION=$1 | ||
| fi | ||
| # Remove any v prefix, if exists. |
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.
But.. the code below is broken. :)
VERSION="${VERSION#v}"
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.
🤦
Updated.
e6470e3 to
ce0b144
Compare
jgehrcke
left a comment
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.
To add to the v-prefix frustration: the "Remove any v prefix, if exists" logic must again be amended in the current patch.
This change removes the v prefix from the Helm chart appVersion. The prefix is prepended in the template helpers if required. This aligns this project with other projects such as the device plugin. Signed-off-by: Evan Lezar <[email protected]>
ce0b144 to
91555a9
Compare
jgehrcke
left a comment
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.
❤️
No more v prefixes for me for 10 years. Hello!
| if [ -z "$1" ]; then | ||
| VERSION=$(awk -F= '/^VERSION/ { print $2 }' versions.mk | tr -d '[:space:]') | ||
| # Remove any v prefix, if exists. | ||
| VERSION="${VERSION#v}" |
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.
Btw, all of this is a great example that (well-maintained) code comments easily can save a bunch of time overall.
| */}} | ||
| {{- define "nvidia-dra-driver-gpu.fullimage" -}} | ||
| {{- $tag := printf "%s" .Chart.AppVersion }} | ||
| {{- $tag := printf "v%s" .Chart.AppVersion }} |
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.
In the future we should add a code comment here, too, if the template language allows for that.
This change removes the v prefix from the Helm chart appVersion. The prefix is prepended in the template helpers if required.
This aligns this project with other projects such as the device plugin.