-
Notifications
You must be signed in to change notification settings - Fork 62
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 a bug in apply resources #389
🐛 Fix a bug in apply resources #389
Conversation
This may impact multiple functions Signed-off-by: Jian Qiu <jqiu@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16 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 |
/assign @zhujian7 |
@@ -88,6 +89,11 @@ func (r *ResourceReader) applyOneObject(info *resource.Info) error { | |||
helper := resource.NewHelper(info.Client, info.Mapping). | |||
DryRun(r.dryRun) | |||
|
|||
modified, err := kubectlutil.GetModifiedConfiguration(info.Object, false, unstructured.UnstructuredJSONScheme) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @qiujian16 could you add some comments/tests for this, I do not understand why moving this func upper can fix the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to get the modified object, it has to be called before info.Get() otherwise the info.Object will be from the server. A test is added.
Signed-off-by: Jian Qiu <jqiu@redhat.com>
/lgtm |
/unhold |
d7db0ea
into
open-cluster-management-io:main
This may impact multiple functions
Summary
Related issue(s)
Fixes #383