Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Respect desired child's controlling owner reference #397

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Respect desired child's controlling owner reference #397

merged 1 commit into from
Aug 2, 2023

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Jul 31, 2023

When a desired child resource has a controlling owner reference defined, we now respect that value and no longer attempt to redefine the reference.

This can be useful when one of the default values needs to have a different value, or the parent resource type is not defined in the scheme.

When a desired child resource has a controlling owner reference defined,
we now respect that value and no longer attempt to redefine the
reference.

This can be useful when one of the default values needs to have a
different value, or the parent resource type is not defined in the
scheme.

Signed-off-by: Scott Andrews <[email protected]>
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (632ae60) 61.36% compared to head (4ac9429) 61.36%.

❗ Current head 4ac9429 differs from pull request most recent head 2b76133. Consider uploading reports for the commit 2b76133 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #397   +/-   ##
=======================================
  Coverage   61.36%   61.36%           
=======================================
  Files          17       17           
  Lines        2275     2275           
=======================================
  Hits         1396     1396           
  Misses        796      796           
  Partials       83       83           
Files Changed Coverage Δ
reconcilers/reconcilers.go 75.96% <100.00%> (ø)

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

@scothis scothis changed the title Respect child desired controlling owner reference Respect desired child's controlling owner reference Jul 31, 2023
@squeedee
Copy link
Collaborator

squeedee commented Aug 2, 2023

This definitely helps, but only if I know I can avoid the no kind is registered for the type <typeref> in scheme <scheme-source-loaction> error by declaring it myself when creating desired objects. Not sure how to surface that to people but perhaps the error can contain a hint?

@scothis
Copy link
Contributor Author

scothis commented Aug 2, 2023

This definitely helps, but only if I know I can avoid the no kind is registered for the type <typeref> in scheme <scheme-source-loaction> error by declaring it myself when creating desired objects. Not sure how to surface that to people but perhaps the error can contain a hint?

This PR will bypass needing to lookup the type in the scheme so long as the desired child already has a controlling owner ref defined. Actually getting the underlaying behavior to work without a type registered in the scheme (or unstructured) is a bit more work and a proper fix is upstream.

@scothis scothis merged commit 04cfbf5 into vmware-labs:main Aug 2, 2023
@scothis scothis deleted the child-desired-owner branch August 2, 2023 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants