File tree 1 file changed +3
-1
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing 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) {
199
199
*/
200
200
private void cacheUpdatedResourceIfChanged (
201
201
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 ()) {
203
205
CustomResource originalCustomResource = executionScope .getCustomResource ();
204
206
CustomResource customResourceAfterExecution =
205
207
postExecutionControl .getUpdatedCustomResource ().get ();
You can’t perform that action at this time.
0 commit comments