Repository navigation
Commit 76be6c0
committed
fix: report an event after a delete event as imminent reconciliation
Context.isNextReconciliationImminent() only checked ResourceState.eventPresent(),
which is false for ADDITIONAL_EVENT_PRESENT_AFTER_DELETE_EVENT. In
triggerReconcilerOnAllEvents mode that state does trigger a new reconciliation
right after the current one, both on the success path
(eventProcessingFinished) and on the failure path (handleRetryOnException), so
the method contradicted its own contract and a reconciler could skip a status
update that nothing else would produce.
Extract the condition handleRetryOnException already computed into a shared
helper and use it for isNextReconciliationImminent() too, so the two cannot
drift apart again. The condition is the one that holds regardless of whether
the current reconciliation succeeds or throws; documented on Context.1 parent 4296fb2 commit 76be6c0
3 files changed
Lines changed: 21 additions & 7 deletions
File tree
- operator-framework-core/src/main/java/io/javaoperatorsdk/operator
- api/reconciler
- processing/event
- operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/triggerallevent/eventing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
385 | | - | |
| 383 | + | |
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
| |||
511 | 509 | | |
512 | 510 | | |
513 | 511 | | |
514 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
515 | 525 | | |
516 | 526 | | |
517 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
0 commit comments