Skip to content

Commit b0ec0e8

Browse files
committed
revert: fix: if a stop handler is set, use it by default
This reverts commit 7d007db.
1 parent 9574a03 commit b0ec0e8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,9 @@ default Optional<LeaderElectionConfiguration> getLeaderElectionConfiguration() {
164164
* if false, the startup will ignore recoverable errors, caused for example by RBAC issues, and
165165
* will try to reconnect periodically in the background.
166166
* </p>
167-
* <p>
168-
* NOTE: this setting is ignored if an informer stop handler is set
169-
* </p>
170167
*/
171168
default boolean stopOnInformerErrorDuringStartup() {
172-
return getInformerStoppedHandler().isEmpty();
169+
return true;
173170
}
174171

175172
/**

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ public Optional<InformerStoppedHandler> getInformerStoppedHandler() {
188188

189189
@Override
190190
public boolean stopOnInformerErrorDuringStartup() {
191-
// only stop on informer error if we didn't set a stop handler for the informers
192-
return stopOnInformerErrorDuringStartup != null && informerStoppedHandler == null
193-
? stopOnInformerErrorDuringStartup
191+
return stopOnInformerErrorDuringStartup != null ? stopOnInformerErrorDuringStartup
194192
: super.stopOnInformerErrorDuringStartup();
195193
}
196194

0 commit comments

Comments
 (0)