-
Notifications
You must be signed in to change notification settings - Fork 198
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
SC panics with nil pointer dereference #680
Comments
Thank you @cwyl02. |
This fixes the immediate issue of the nil pointer dereference but we still haven't isolated the actual cause of the size being nil to begin with. This is ongoing work and as soon as we have boiled that down to the simplest case we will provide a regression test for that case. closes #680 Signed-off-by: Max Jonas Werner <[email protected]>
This fixes the immediate issue of the nil pointer dereference but we still haven't isolated the actual cause of the size being nil to begin with. This is ongoing work and as soon as we have boiled that down to the simplest case we will provide a regression test for that case. closes #680 Signed-off-by: Max Jonas Werner <[email protected]> Co-authored-by: Hidde Beydals <[email protected]>
I think the root cause is that HelmRepository created with Then, when SC(v0.23.0+) reconciles an HelmRepository, it panics at that notify and cannot move on reconciling the object(including the API version). This is fixed in @makkes' PR. Thus, HelmRepository's artifact size can be nil and can be very common when the user is upgrading from a legacy HelmRepository object. I don't think additional changes are required. |
Great catch @cwyl02. Thanks for your persistence. |
This is coming from https://github.com/fluxcd/source-controller/blob/v0.24.0/controllers/helmrepository_controller.go#L258 where SC in fact doesn't check if
newObj.Status.Artifact.Size
is nil, dereferencing it in any case.I'm not sure in which situation this field would be nil but I don't see it set in older, working instances of SC, too.
The text was updated successfully, but these errors were encountered: