Skip to content

Fake client on version 0.23.1 fails to SSA Apply status due to resourceVersion checks #3442

@josvazg

Description

@josvazg

We might have found an issue with version 0.23.1's fake client implementation around the new SSA Apply support.

We noticed that doing an SSA on the status when the resource version does not match returns an error such as:

"Operation cannot be fulfilled on ... object was modified"

This is unexpected as the point of SSA, like pathing, is that it is a focused update that is applied as is.

Steps to reproduce:

  • Set up a fake client for unit testing with some object, e.g. a Pod.
  • Ensure the resource version differs from the one about to be used.
  • Attempt a SSA Apply on the Pod status.
    Expected result: SSA Apply should work

Actual result: SSA Apply fails with "object was modified" as if it was a regular update.

We will provide a PR with a test case and a draft fix for evaluation.

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