-
Notifications
You must be signed in to change notification settings - Fork 3
🐛 Fix: Handle empty chart directory correctly #289
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
base: main
Are you sure you want to change the base?
🐛 Fix: Handle empty chart directory correctly #289
Conversation
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.
Thanks a lot for the PR!
We currently have a function CheckHelmCharts that should take care of this. I believe that we forgot to update it for the case of multi-stage cluster addons. I think the proper way of handling this would be to update that function in a way that it does its job.
Can you maybe look into this?
@janiskemper if I see it correctly, |
@chess-knight true, my bad. However, my point is still the same. We have this function on purpose to check that everything is correct. Apparently, it doesn't do its job. We should fix that function rather than propagating the error in the other function |
e80d1a3
to
732b6fa
Compare
@janiskemper I added a call to helmChartNamePath to the validation method. This will show if something is wrong with the name in the helm chart. (Basically it is the same call that raises the error in this case.) However I would like to keep the propagation of errors, because it is better to get an error message if it is already available than to drop it on purpose. If there are still some unexpected errors this will definitely help debuging. |
There is the function CheckHelmCharts that has the exact same purpose that you have in mind. Can you plz check how you can add it to that function? I don't mind if you additionally return it with the other function, that should just not be needed anymore |
Currently the return of helmChartNamePath is not checked on errors. This means that the CSO tries to helm template the container which leads to cryptic error messages from helm. This commit adds a check to the helm chart validation. Signed-off-by: Jan Klippel <jan.klippel@uhurutec.com>
732b6fa
to
a5cd643
Compare
ok, moved the validation call to |
alright! Thanks for the info. Then the problem is actually that the function was not called in the clusterstackrelease controller. We have this in the clusteraddon-controller:
|
Currently the return of helmChartNamePath is not checked on errors. This means that the CSO tries to helm template the container which leads to cryptic error messages from helm.
This commit adds a check on errors on the call to helmChartNamePath and results in more helpful error messages by helm.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #288
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
The log message after the patch is more helpful:
TODOs: