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

Change ForDynamic to proper generic type *Unstructured #795

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

tpantelis
Copy link
Contributor

...instead of runtime.Object, which I think was used originally to preserve the behavior of allowing any runtime.Object and internally converting to *Unstructured but we can easily adjust users accordingly.

Some resource syncer unit tests failed b/c previously ForDynamic had the side effect of actually modifying the resource on Update and the tests did not explicitly retrieve the updated resource after test.UpdateResource. The fake Federator was also modified to internally convert to *Unstructured to simplify users.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr795/tpantelis/for_dynamic

@tpantelis tpantelis force-pushed the for_dynamic branch 2 times, most recently from 40fe4d7 to aaca26a Compare November 16, 2023 16:44
Copy link
Member

@skitt skitt left a comment

Choose a reason for hiding this comment

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

The necessary changes in consumers are easy to make. Thanks!

@tpantelis
Copy link
Contributor Author

The necessary changes in consumers are easy to make. Thanks!

yeah I changed submariner and lighthouse locally.

@tpantelis tpantelis enabled auto-merge (rebase) November 17, 2023 01:30
...instead of runtime.Object, which I think was used originally to
preserve the behavior of allowing any runtime.Object and internally
converting to *Unstructured but we can easily adjust users accordingly.

Some resource syncer unit tests failed b/c previously ForDynamic had the
side effect of actually modifying the resource on Update and the tests
did not explicitly retrieve the updated resource after test.UpdateResource.
The fake Federator was also modified to internally convert to *Unstructured
to simplify users.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
@tpantelis tpantelis merged commit b6bf998 into submariner-io:devel Nov 17, 2023
16 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr795/tpantelis/for_dynamic]

@tpantelis tpantelis deleted the for_dynamic branch November 20, 2023 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants