Skip to content

Commit 5cf7d41

Browse files
committed
fix: retry finalizer on http 422
this can happen if there are multiple finalizers present and multiple reconilers competent to remove their finalizer, since we remove the finalizer with JSON Patch Signed-off-by: Attila Mészáros <[email protected]>
1 parent 4225645 commit 5cf7d41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public P conflictRetryingPatch(
382382
log.trace("Exception during patch for resource: {}", resource);
383383
retryIndex++;
384384
// only retry on conflict (HTTP 409), otherwise fail
385-
if (e.getCode() != 409) {
385+
if (e.getCode() != 409 && e.getCode() != 422) {
386386
throw e;
387387
}
388388
if (retryIndex >= MAX_UPDATE_RETRY) {

0 commit comments

Comments
 (0)