Skip to content

PUT instead of PATCH used for UpdateControl.patchResourceAndStatus(resource) #1757

Closed
@codepitbull

Description

@codepitbull

Bug Report

I wanted to patch both status and resource returning UpdateControl.patchResourceAndStatus(resource) from the reconcile.
My tests became flaky with an occasional the object has been modified; please apply your changes to the latest version and try again..

What did you do?

Use UpdateControl.patchResourceAndStatus(resource) to get both, status and resource patched.

What did you expect to see?

Patch should be sued for status und resource

What did you see instead? Under which circumstances?

This is either a bug or the method-name implies a wrong operation being used.

In ReconciliationDeispatcher.reconcileExecution updateResource is used, which ignores the provided patch-flag.

So only the status gets patched, not the resource.

Environment

All k8s-versions.

Possible Solution

If the intention of the method is to only patch the status and to use put for the resource it should be reflected in the method name.
If not then I guess I found a bug ;)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions