Skip to content

0.14.1 regression: cannot use server-side apply #2125

@Gchbg

Description

@Gchbg

Hi,

After upgrading from 0.13.1 to 0.14.1, I can no longer use server-side apply.

In 0.13.1 I used to be able to do this:
err = r.Status().Patch(ctx, obj, client.Apply, client.FieldOwner("whatever"), client.ForceOwnership)

In 0.14.1 this results in:

Cannot use 'client.FieldOwner("whatever")' (type client.FieldOwner) as the type SubResourcePatchOptionType does not implement 'SubResourcePatchOption' as some methods are missing:ApplyToSubResourcePatch(*SubResourcePatchOptions)
Cannot use 'client.ForceOwnership' (type forceOwnership) as the type SubResourcePatchOptionType does not implement 'SubResourcePatchOption' as some methods are missing:ApplyToSubResourcePatch(*SubResourcePatchOptions)

I assume this is due to the breaking change introduced in #2072. It seems that client.FieldOwner and client.ForceOwnership were not updated to use the new SubResourcePatchOption interface instead of the existing PatchOption interface.

If this was intended, I would appreciate any insight about what the line of code should look like in 0.14.1.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions