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

Update ToUnstructured to handle already unstructured case #824

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

errordeveloper
Copy link
Contributor

This version of the function is more robus, it's what is used in Timoni, updating it hear would alow avoid copies in other places.

@errordeveloper
Copy link
Contributor Author

errordeveloper commented Nov 20, 2024

Eh, I suppose ToUnstructured(object metav1.Object) and ToUnstructured(object runtime.Object) are two quite distinct functions after all, despite looking so similar! Could be the case that metav1.Object cannot be unstructured actually?

Looks like I didn't have to actually change the argument type in the first place.

This version of the function is more robus, it's what is used in
Timoni, updating it hear would alow avoid copies in other places.

Signed-off-by: Ilya Dmitrichenko <idmitrichenko@coreweave.com>
@errordeveloper
Copy link
Contributor Author

errordeveloper commented Nov 20, 2024

@stefanprodan the intention is to make PR to Timoni and drop a copy of this function from there. I have a few other places where I used the other version.

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @errordeveloper

@stefanprodan stefanprodan added the area/server-side-apply SSA related issues and pull requests label Nov 21, 2024
@stefanprodan stefanprodan merged commit 1004b4b into fluxcd:main Nov 23, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/server-side-apply SSA related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants