-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[release-0.16] 🐛 Handle unstructured status update with fake client #2523
Merged
k8s-ci-robot
merged 1 commit into
kubernetes-sigs:release-0.16
from
troy0820:troy0820/cherry-pick-to-release-0.16
Oct 5, 2023
Merged
[release-0.16] 🐛 Handle unstructured status update with fake client #2523
k8s-ci-robot
merged 1 commit into
kubernetes-sigs:release-0.16
from
troy0820:troy0820/cherry-pick-to-release-0.16
Oct 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…#2495) * Handle unstructured status update with fake client In order to prevent unintentional mutations outside of the status during a status update, the non-status fields are copied back onto the passed object. This operation now gracefully handles both unstructured and typed objects. Previously, it would panic if an unstructured object was passed for a GVK known to the scheme, as internally the object within the tracker is converted to the typed equivalent. The two types cannot be directly assigned to each other and instead must be copied. Signed-off-by: Scott Andrews <andrewssc@vmware.com> * Review feedback Using typed objects for the initial and actual object content assertion. Unstructured objects are only used for the update. Signed-off-by: Scott Andrews <andrewssc@vmware.com> --------- Signed-off-by: Scott Andrews <andrewssc@vmware.com>
k8s-ci-robot
added
the
cncf-cla: yes
Indicates the PR's author has signed the CNCF CLA.
label
Oct 5, 2023
k8s-ci-robot
added
the
size/M
Denotes a PR that changes 30-99 lines, ignoring generated files.
label
Oct 5, 2023
troy0820
changed the title
[release-0.16] 🐛 Handle unstructured status update with fake client (#2495)
[release-0.16] 🐛 Handle unstructured status update with fake client
Oct 5, 2023
alvaroaleman
approved these changes
Oct 5, 2023
k8s-ci-robot
added
the
lgtm
"Looks good to me", indicates that a PR is ready to be merged.
label
Oct 5, 2023
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, troy0820 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
k8s-ci-robot
added
the
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
label
Oct 5, 2023
k8s-ci-robot
merged commit Oct 5, 2023
8361246
into
kubernetes-sigs:release-0.16
3 of 4 checks passed
renovate bot
referenced
this pull request
in open-feature/flagd
Oct 19, 2023
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [sigs.k8s.io/controller-runtime](https://togithub.com/kubernetes-sigs/controller-runtime) | require | patch | `v0.16.2` -> `v0.16.3` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>kubernetes-sigs/controller-runtime (sigs.k8s.io/controller-runtime)</summary> ### [`v0.16.3`](https://togithub.com/kubernetes-sigs/controller-runtime/releases/tag/v0.16.3) [Compare Source](https://togithub.com/kubernetes-sigs/controller-runtime/compare/v0.16.2...v0.16.3) #### What's Changed - 🐛Update dependency go-restful to 3.11.0 by [@​k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot) in [https://github.com/kubernetes-sigs/controller-runtime/pull/2516](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2516) - 🐛 Correctly identify if patch call was made on status by [@​k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot) in [https://github.com/kubernetes-sigs/controller-runtime/pull/2515](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2515) - 🐛 Handle unstructured status update with fake client by [@​troy0820](https://togithub.com/troy0820) in [https://github.com/kubernetes-sigs/controller-runtime/pull/2523](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2523) - ✨ Cache: Allow defining options that apply to all namespaces that themselves have no explicit config by [@​k8s-infra-cherrypick-robot](https://togithub.com/k8s-infra-cherrypick-robot) in [https://github.com/kubernetes-sigs/controller-runtime/pull/2539](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2539) - 🐛 bump golang.org/x/net to v0.17.0 by [@​joelanford](https://togithub.com/joelanford) in [https://github.com/kubernetes-sigs/controller-runtime/pull/2541](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2541) - 🌱 Bump k8s to 1.28.3 by [@​varshaprasad96](https://togithub.com/varshaprasad96) in [https://github.com/kubernetes-sigs/controller-runtime/pull/2552](https://togithub.com/kubernetes-sigs/controller-runtime/pull/2552) **Full Changelog**: kubernetes-sigs/controller-runtime@v0.16.2...v0.16.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/flagd). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
cncf-cla: yes
Indicates the PR's author has signed the CNCF CLA.
lgtm
"Looks good to me", indicates that a PR is ready to be merged.
size/M
Denotes a PR that changes 30-99 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to prevent unintentional mutations outside of the status during a status update, the non-status fields are copied back onto the passed object.
This operation now gracefully handles both unstructured and typed objects. Previously, it would panic if an unstructured object was passed for a GVK known to the scheme, as internally the object within the tracker is converted to the typed equivalent. The two types cannot be directly assigned to each other and instead must be copied.