-
Notifications
You must be signed in to change notification settings - Fork 262
fix(pkg/helm): Use New
to create a complete EnvSettings
struct
#626
Conversation
Signed-off-by: Kingdon Barrett <yebyen@gmail.com>
…ddresses from uninitialised fields Signed-off-by: Sam Giles <sam.giles@citymapper.com>
5014341
to
2bb5f3b
Compare
f3c17a1
to
12cbb5a
Compare
Is this an issue with the 1.3.0 release so we should delay publishing it? (I have my finger on the button right now, and just saw your issue. The 1.4.0 release wasn't scheduled for tomorrow, so I'll be happy to include your fix!) |
I don't see that either branch has upgraded Helm past 3.5.2, the change you linked shows Helm added this at 3.6.2, but I don't fully understand the change that made this necessary, or think any of our test suite is likely to cover Helm Plugins very well, and I did not test this with any helm plugins by hand. I've already merged 1.3.0 to the 1.3.x branch just as I saw your issue, and was about to kick off the process of releasing it now, but I'd rather delay for a couple of hours rather than publish 1.3.0 quickly followed by 1.3.1 if I can avoid it. |
I think this is an issue with 1.3 too, I tried the 1.3.0-rc1 image just now in my config and get the same error. |
I've been apprised that since Helm Controller won't support helm plugins, it's not encouraged in Helm Operator and that this PR will enable a lot more than simply fixing the SIGSEGV (things which we don't want to be considered supported, that would complicate your migration to Helm Controller in the future.) Can you provide some idea of the steps needed to repro the issue, or if it occurs even without the use of Helm Plugins? |
I haven't tested without the Plugin, but this happens everytime with a plugin installed. I think theoretically this code path could be triggered with a "non-plugin" getter, but in this case it doesn't. My chart values.yaml file I'm testing with is roughly:
You need the plugin to successfully init so the operator can start. Not sure if there's some test plugin that is easy to config. -- |
If you're comfortable with that, then I'm going to go ahead with the release. Glad to hear you have plans to upgrade, and I very much appreciate you bringing this issue to our attention ahead of the release. I will update the CHANGELOG and include in the release notes, so others who are using Helm plugins know this is an issue to be aware of before upgrading is attempted. |
🙏🏼 Yep great! Thanks! |
Thanks for submitting this patch! The reason I did not use I would accept a patch that "mimics" |
This avoids invalid memory addresses from uninitialised fields when initialising plugin environments.
Upgrading Helm brought in this change which relies on config being set to a valid reference. Calling
New
ensures that it is. :)Sorry this is pulled into the chart-bump-1.4.0 branch, I was also testing the charts and haven't got time right now to test on master. I can clean up the commit etc tomorrow, just wanted to document this.
Was seeing this error in the 1.4.0-rc1: