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

Api methods related to patch generation #4363

Closed
shawkins opened this issue Aug 29, 2022 · 1 comment · Fixed by #4647
Closed

Api methods related to patch generation #4363

shawkins opened this issue Aug 29, 2022 · 1 comment · Fixed by #4647
Assignees
Milestone

Comments

@shawkins
Copy link
Contributor

Is your enhancement related to a problem? Please describe

Currently PatchUtils is in the impl, so you can't normally directly call jsonDiff or the related withoutRuntimeState methods. We may want to expose that. Additionally there is a related problem - detecting when a resource has changed. The ResourceCompare utility is in the api, but it currently just looks at all fields in the metadata. It ideally could be more flexible / quick - such as just comparing the generation for the spec and then compare the non-managed metadata fields.

Describe the solution you'd like

Additional ResourceCompare and possibly PatchUtils.

Describe alternatives you've considered

No response

Additional context

No response

@shawkins shawkins added this to the 6.3.0 milestone Oct 20, 2022
@shawkins shawkins self-assigned this Nov 9, 2022
@shawkins
Copy link
Contributor Author

@manusa @rohanKanojia in looking at doing this work it seems best to deprecate ResourceCompare:

  • it is not used internally in the codebase. I gather it used to be used by createOrReplace logic
  • equals is not descriptive of what it is doing. It's checking instead if any of the non-null fields in the right entity have been changed in the left entity. That is a very specific type of check.

Any objections?

shawkins added a commit to shawkins/kubernetes-client that referenced this issue Dec 7, 2022
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Dec 7, 2022
manusa pushed a commit to shawkins/kubernetes-client that referenced this issue Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant