File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,9 @@ private RetryExecution getOrInitRetryExecution(ExecutionScope executionScope) {
199199 */
200200 private void cacheUpdatedResourceIfChanged (
201201 ExecutionScope executionScope , PostExecutionControl postExecutionControl ) {
202- if (postExecutionControl .customResourceUpdatedDuringExecution ()) {
202+ // only update the cache if the execution didn't fail and the resource was updated
203+ if (!postExecutionControl .exceptionDuringExecution ()
204+ && postExecutionControl .customResourceUpdatedDuringExecution ()) {
203205 CustomResource originalCustomResource = executionScope .getCustomResource ();
204206 CustomResource customResourceAfterExecution =
205207 postExecutionControl .getUpdatedCustomResource ().get ();
You can’t perform that action at this time.
0 commit comments