-
Notifications
You must be signed in to change notification settings - Fork 53
fix: error being silenced during apply #395
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
fix: error being silenced during apply #395
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Although it feels like such issue should really be caught by unit tests. Could you maybe take a stab at adding such case?
d330dfe
to
174c755
Compare
sure! i'll then add a case for that |
Signed-off-by: Tianpeng Wang <tpwang@alauda.io>
174c755
to
1c63d8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but the comments seem a bit off.
Co-authored-by: Marcin Owsiany <marcin@owsiany.pl>
Signed-off-by: Tianpeng Wang <tpwang@alauda.io>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
==========================================
- Coverage 85.06% 79.67% -5.40%
==========================================
Files 19 31 +12
Lines 1346 1958 +612
==========================================
+ Hits 1145 1560 +415
- Misses 125 310 +185
- Partials 76 88 +12 ☔ View full report in Codecov by Sentry. |
Any particular reason why the Apply operation can't be done at the end of the function instead of in a defer clause? |
Becasue the Apply() is for status update here. When early return (in case of error) from Reconcile loop, you need to set error conditions for your managed CR resources, the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Thank you <3
Uh oh!
There was an error while loading. Please reload this page.