Issue #410: fix reconcile if foreground cascading deletion is used#530
Issue #410: fix reconcile if foreground cascading deletion is used#530lipov3cz3k wants to merge 3 commits intopravega:masterfrom
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #530 +/- ##
==========================================
- Coverage 85.91% 85.81% -0.10%
==========================================
Files 12 12
Lines 1633 1636 +3
==========================================
+ Hits 1403 1404 +1
Misses 145 145
- Partials 85 87 +2 ☔ View full report in Codecov by Sentry. |
|
I also experienced this multiple times. Have to explicitly use non-cascading delete for it to work. |
|
@lipov3cz3k can you perhaps fix the two failed tests "DCO" and "codecov/patch", so it is more likely that the maintainers can approve and merge this? |
edc3bef to
2c0927d
Compare
|
@lipov3cz3k Could you please increase the code coverage? |
| } | ||
| return reconcile.Result{Requeue: true}, nil | ||
| } | ||
| if finalized, err := r.reconcileFinalizers(instance); err != nil || finalized { |
There was a problem hiding this comment.
It would be much cleaner if we returned an error when there is a need to do another attempt to run a reconcile loop.
| } | ||
| } | ||
| return nil | ||
| return true, nil |
There was a problem hiding this comment.
Would be cleaner to return some kind of error at this point instead of introducing a boolean.
a2bbf41 to
84bb982
Compare
Signed-off-by: Lipovsky, Tomas <tomas.lipovsky@firma.seznam.cz>
84bb982 to
ea2812b
Compare
|
@lipov3cz3k Is it possible to increase the coverage? |
Change log description
Fix unexpected resource creation when the ZookeeperCluster is already deleted
Purpose of the change
Fixes #410
What the code does
Exit reconcile when resource has finalizer and is marked for delete. That's prevent to apply other reconcile functions to create already deleted resources.
How to verify it
Delete
zookeeperclusterresource inforegroundmode -> without this patch it goes to loop (you can fix it by deleting zookeeper in defaultbackgroundmode)