Skip to content

Drop deprecated ResourceManager APIs#549

Merged
scothis merged 2 commits intoreconcilerio:mainfrom
scothis:object-manager
Oct 4, 2024
Merged

Drop deprecated ResourceManager APIs#549
scothis merged 2 commits intoreconcilerio:mainfrom
scothis:object-manager

Conversation

@scothis
Copy link
Member

@scothis scothis commented Oct 3, 2024

Drops deprecated APIs for ResourceManager, and migrates tests from the ChildReconciler to the UpdatingObjectManager. This was a holdover from before ResouceManager was extracted from ChildReconciler.

The StubObjectManager is useful for testing a reconciler that needs to interact with an ObjectManager. It will preform a basic create/update/delete and nothing else.

The ObjectManagerReconcilerTestHarness is useful for testing a custom ObjectManager in the context of a reconciler test case. The actual, expected and result objects are stored in the reconciler stash.

Signed-off-by: Scott Andrews <scott@andrews.me>
Previously tests for the ResourceManager were bound to the
ChildReconciler from before ResourceManager was split from
ChildReconciler.

The ObjectManagerReconcilerTestHarness provides a way to focus tests on
just the ObjectManager's behavior.

Signed-off-by: Scott Andrews <scott@andrews.me>
@scothis scothis requested a review from mamachanko October 3, 2024 18:33
@codecov
Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 64 lines in your changes missing coverage. Please review.

Project coverage is 58.93%. Comparing base (72b6e1c) to head (674a20e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
testing/objectmanager.go 0.00% 57 Missing ⚠️
testing/client.go 33.33% 4 Missing ⚠️
testing/subreconciler.go 0.00% 2 Missing ⚠️
reconcilers/stash.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #549      +/-   ##
==========================================
- Coverage   59.83%   58.93%   -0.90%     
==========================================
  Files          32       33       +1     
  Lines        2958     2981      +23     
==========================================
- Hits         1770     1757      -13     
- Misses       1094     1130      +36     
  Partials       94       94              

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

Copy link
Contributor

@mamachanko mamachanko left a comment

Choose a reason for hiding this comment

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

wow+lgtm

@scothis scothis merged commit 7437a9b into reconcilerio:main Oct 4, 2024
@scothis scothis deleted the object-manager branch October 4, 2024 15:36
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 this pull request may close these issues.

2 participants