Closed
Description
All of the Create
, List
, Update
and Delete
client methods are variadic in that it takes any number of options. For example:
Create(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
It's too easy to pass nil
as the last argument for these methods and then it blows up with a NPE in ApplyOptions
method. Example:
controller-runtime/pkg/client/options.go
Line 141 in 19e72eb
There needs to be a nil check when options are applied.
Metadata
Metadata
Assignees
Labels
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Categorizes issue or PR as related to cleaning up code, process, or technical debt.Higher priority than priority/awaiting-more-evidence.