Skip to content
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

⚠️ Fakeclient: Reject Delete with mismatched ResourceVersion #1582

Merged
merged 1 commit into from
Jul 8, 2021
Merged

⚠️ Fakeclient: Reject Delete with mismatched ResourceVersion #1582

merged 1 commit into from
Jul 8, 2021

Commits on Jul 8, 2021

  1. ⚠️ Fakeclient: Reject Delete with mismatched ResourceVersion

    `Delete` takes optional varargs comprising `DeleteOption`s. Previously
    fakeclient was validating that these could be run through
    `ApplyOptions`, but otherwise ignoring them.
    
    With this commit, fakeclient will observe a `DeleteOption` specifying a
    `Precondition.ResourceVersion`, rejecting the deletion if the value does
    not match what's on the "server", bringing fakeclient's behavior more in
    line with a real client.
    
    Note that, while technically a breaking change, any test that was
    relying on the previous behavior was already broken.
    
    xref #832 / 25ef372 which did something similar for `Create` and
    `Update`. Major difference being that those methods do `ResourceVersion`
    matching by default, whereas `Delete` only does it if opted in via the
    `Precondition`.
    2uasimojo committed Jul 8, 2021
    Configuration menu
    Copy the full SHA
    5fb1382 View commit details
    Browse the repository at this point in the history