Skip to content

Allow ChildReconciler to choose which errors to reflect#579

Merged
scothis merged 2 commits intoreconcilerio:mainfrom
scothis:reflected-child-errors
Jan 28, 2025
Merged

Allow ChildReconciler to choose which errors to reflect#579
scothis merged 2 commits intoreconcilerio:mainfrom
scothis:reflected-child-errors

Conversation

@scothis
Copy link
Member

@scothis scothis commented Jan 28, 2025

A ChildReconciler can affirmatively select which errors to pass to ReflectChildStatusOnParent by defining ReflectedChildErrorReasons. Like before, reflecting errors is like a catch. Errors not reflected are returned by the ChildReconciler so the reconcile request can be retried. Handled error reasons are not returned.

By default, StatusReasonForbidden is now included along with the previous StatusReasonAlreadyExists and StatusReasonInvalid.

A ChildReconciler can affirmatively select which errors to pass to
ReflectChildStatusOnParent by defining ReflectedChildErrorReasons. Like
before, reflecting errors is like a catch. Errors not reflected are
returned by the ChildReconciler so the reconcile request can be retried.
Handled error reasons are not returned.

By default, StatusReasonForbidden is now included along with the
previous StatusReasonAlreadyExists and StatusReasonInvalid.

Signed-off-by: Scott Andrews <scott@andrews.me>
@scothis scothis requested a review from mamachanko January 28, 2025 17:08
@codecov
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.33%. Comparing base (880c7c9) to head (a1fea62).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #579      +/-   ##
==========================================
+ Coverage   58.25%   58.33%   +0.08%     
==========================================
  Files          33       33              
  Lines        3787     3795       +8     
==========================================
+ Hits         2206     2214       +8     
  Misses       1487     1487              
  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.

👌

Copy link

@rashedkvm rashedkvm left a comment

Choose a reason for hiding this comment

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

looks good

Signed-off-by: Scott Andrews <scott@andrews.me>
@scothis scothis merged commit 1386bbb into reconcilerio:main Jan 28, 2025
4 checks passed
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.

3 participants