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

✨ Implement ignoreFields in server side apply #726

Conversation

qiujian16
Copy link
Member

@qiujian16 qiujian16 commented Nov 28, 2024

Summary

Related issue(s)

Fixes #690

@openshift-ci openshift-ci bot requested review from elgnay and zhujian7 November 28, 2024 09:18
Copy link
Contributor

openshift-ci bot commented Nov 28, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@qiujian16
Copy link
Member Author

/hold

@qiujian16 qiujian16 force-pushed the mw-udpate-strategy branch 2 times, most recently from aac9e2e to ad9643b Compare November 28, 2024 09:32
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 85.13514% with 11 lines in your changes missing coverage. Please review.

Project coverage is 63.43%. Comparing base (9eb8131) to head (99c10be).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/work/spoke/apply/server_side_apply.go 85.13% 6 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #726      +/-   ##
==========================================
+ Coverage   63.33%   63.43%   +0.09%     
==========================================
  Files         187      187              
  Lines       17921    17985      +64     
==========================================
+ Hits        11351    11409      +58     
- Misses       5635     5637       +2     
- Partials      935      939       +4     
Flag Coverage Δ
unit 63.43% <85.13%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhujian7
Copy link
Member

zhujian7 commented Dec 2, 2024

LGTM

}
}

func TestServerSideApplyWithIgnoreFields(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense if ignorefields is .metadata.xxx? For example, what if ignorefields is .metadata.annotations and type is IgnoreOnSpokePresent, will the existing annotations be kept on the spoke or be override by object-hash?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be kept. We compute the hash for the whole object including metadata.

@haoqing0110
Copy link
Member

LGTM

@qiujian16
Copy link
Member Author

/unhold

@zhujian7
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 10, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 0897da6 into open-cluster-management-io:main Dec 10, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Work supports ignore resources's fileds differents
4 participants