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

fix: mutateExisting - set resourceVersion before update #5906

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

realshuting
Copy link
Member

@realshuting realshuting commented Jan 6, 2023

Signed-off-by: ShutingZhao shuting@nirmata.com

Explanation

This PR set the new object's resource version before updating it.

Related issue

Closes #5769.

Milestone of this PR

/1.9.0

What type of PR is this

/bug

Proposed Changes

Proof Manifests

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.
  • This is a feature and I have added CLI tests that are applicable.
  • My PR needs to be cherry picked to a specific release branch which is .
  • My PR contains new or altered behavior to Kyverno and
    • CLI support should be added and my PR doesn't contain that functionality.
    • I have added or changed the documentation myself in an existing PR and the link is:
    • I have raised an issue in kyverno/website to track the documentation update and the link is:

Further Comments

Signed-off-by: ShutingZhao <shuting@nirmata.com>
@realshuting
Copy link
Member Author

/cherry-pick release-1.9

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #5906 (5941bc1) into main (21f1d2b) will not change coverage.
The diff coverage is n/a.

❗ Current head 5941bc1 differs from pull request most recent head 6db3c70. Consider uploading reports for the commit 6db3c70 to get more accurate results

@@           Coverage Diff           @@
##             main    #5906   +/-   ##
=======================================
  Coverage   35.75%   35.75%           
=======================================
  Files         188      188           
  Lines       20886    20886           
=======================================
  Hits         7467     7467           
  Misses      12599    12599           
  Partials      820      820           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@realshuting realshuting enabled auto-merge (squash) January 6, 2023 12:15
@realshuting realshuting merged commit de2fcc8 into kyverno:main Jan 6, 2023
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 6, 2023
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
@realshuting realshuting added the cherry-pick-completed The PR was cherry-picked (or merged) to required release branches label Jan 6, 2023
eddycharly pushed a commit that referenced this pull request Jan 6, 2023
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
@realshuting realshuting deleted the fix_invalid_resource_version branch January 9, 2023 12:54
MdSahil-oss pushed a commit to MdSahil-oss/kyverno that referenced this pull request Jan 11, 2023
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
MdSahil-oss pushed a commit to MdSahil-oss/kyverno that referenced this pull request Jan 11, 2023
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-completed The PR was cherry-picked (or merged) to required release branches cherry-pick-required milestone 1.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] 'metadata.resourceVersion: Invalid Value: 0x0: must be specified for an update'
2 participants