Skip to content

Draft: Implement 'reconcileComponent' method

This is an example branched off of !238 (merged).

  • Adds a method named 'reconcileComponent', which takes 'component' as a string and reconciles any existing objects for that component.
  • Implements 'reconcileComponent' to replace any calls to 'reconcileXYZ'.

Notes:

  • The 'reconcileComponent' method has several 'if' checks that will perform mutations on certain objects. This isn't ideal, but perhaps it signifies that we should do patches more consistently anyway.
  • Because the call needs to be generic enough for any component, I used '(ObjectTypes)ByComponent', which calls '(ObjectTypesByLabels)' under the hood. The downside here is that function could return 0 objects, meaning we would be silently ignoring scenarios where we expected an object but never got one.
Edited by Mitchell Nielsen

Merge request reports

Loading