-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Runtime error due to nil pointer dereference on TargetRef fields missing #646
Comments
Sounds good to me, thanks |
@tomkerkhove if you want, you can assign this to me. |
@ppatierno thanks, I've just found the problem as well. Working on the fix already, so I can handle this, in case you haven't already started :) |
@zroubalik not yet started, I can do it this evening but if you can work on it right now, I am fine to give the issue to you ;-) your call! |
@ppatierno ok, I'll assign to myself, you deserve some rest :) thanks! |
When a ScaledObject resource is created but it's missing both the
scaledTargetRef
and thejobTargetRef
fields, the controller assumes itsScaleType
is a "job" but then a runtime error happens due to a nil pointer dereference.It happens in the
resolveJobEnv
method.I would fix it just doing a check in the caller method
getJobScalers
that thejobTargetRef
is not nil and returning an error eventually. Maybe we should do the same in theGetDeploymentScalers
even if it should not happen.The text was updated successfully, but these errors were encountered: