-
Notifications
You must be signed in to change notification settings - Fork 92
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
make: Suppress symlink warnings on getting k8gb $VERSION #499
Conversation
Suppress helm "walk.go:74: found symbolic link..." message noise during k8gb helm chart $VERSION extraction in Makefile by muting the shell command stderr. Other helm commands in Makefile are deliberately left intact to not miss possible helm errors. Signed-off-by: Timofey Ilinykh <timofey.ilinykh@absa.africa>
@@ -58,7 +58,7 @@ NO_VALUE ?= no_value | |||
# VARIABLES | |||
############################### | |||
PWD ?= $(shell pwd) | |||
VERSION ?= $(shell helm show chart chart/k8gb/|awk '/appVersion:/ {print $$2}') | |||
VERSION ?= $(shell helm show chart chart/k8gb/ 2> /dev/null | awk '/appVersion:/ {print $$2}') |
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 if stderr
contains a valid error? it will be invisible right?
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.
@ytsarev I've tried to minimize the silencing impact only to this command, but yes, errors will be suppressed.
Regarding possible valid errors for this command, I see issues like helm not installed, chart code missing, appVersion missing in the chart, malformed helm command. In all cases, except missing appVersion, the errors are produced, but the execution proceeds with the empty $(VERSION)
variable. In the case of missing appVersion, no errors produced at all.
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.
VERSION ?= $(shell helm show chart chart/k8gb/ 2> /dev/null | awk '/appVersion:/ {print $$2}') | |
VERSION ?= $(shell helm show chart chart/k8gb/ 2>&1 |grep -v 'found symbolic link in path' | awk '/appVersion:/ {print $$2}') |
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.
@ytsarev , since awk is "interested" in awkVersion:
only, it will suppress the rest of stdout, including the redirected stderr with possible errors.
@somaritane which version of helm do you use?
|
@ytsarev mine is v3.5.4 I can downgrade and check. |
v3.3.4 version acts the same for me |
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.
Suggested the safer suppression method above
After carefully checking helm issues:
README replacement is already tracked by separate issue #359, same should be done with LICENSE. I'm going to close the PR. |
This PR suppresses
walk.go:74: found symbolic link...
message noise during k8gb helm chart $VERSION extraction in Makefile by muting the stderr stream for that command.Before:
After:
Signed-off-by: Timofey Ilinykh timofey.ilinykh@absa.africa