Skip to content

Commit 11c10bd

Browse files
committed
Backport additional changes from main
1 parent cd4bd77 commit 11c10bd

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

operator/src/main/java/oracle/kubernetes/operator/WaitForReadyStep.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ int incrementAndGetRecheckCount() {
316316
return recheckCount.incrementAndGet();
317317
}
318318

319+
int getAndIncrementRecheckCount() {
320+
return recheckCount.getAndIncrement();
321+
}
322+
319323
int getRecheckCount() {
320324
return recheckCount.get();
321325
}

operator/src/main/java/oracle/kubernetes/operator/steps/WatchDomainIntrospectorJobReadyStep.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
package oracle.kubernetes.operator.steps;
55

66
import io.kubernetes.client.openapi.models.V1Job;
7-
import oracle.kubernetes.operator.DomainStatusUpdater;
87
import oracle.kubernetes.operator.JobAwaiterStepFactory;
98
import oracle.kubernetes.operator.JobWatcher;
109
import oracle.kubernetes.operator.ProcessingConstants;
1110
import oracle.kubernetes.operator.work.NextAction;
1211
import oracle.kubernetes.operator.work.Packet;
1312
import oracle.kubernetes.operator.work.Step;
1413

14+
import static oracle.kubernetes.operator.DomainStatusUpdater.createRemoveFailuresStep;
15+
1516
public class WatchDomainIntrospectorJobReadyStep extends Step {
1617

1718
@Override
@@ -20,9 +21,9 @@ public NextAction apply(Packet packet) {
2021

2122
if (hasNotCompleted(domainIntrospectorJob)) {
2223
JobAwaiterStepFactory jw = packet.getSpi(JobAwaiterStepFactory.class);
23-
return doNext(jw.waitForReady(domainIntrospectorJob, getNext()), packet);
24+
return doNext(jw.waitForReady(domainIntrospectorJob, createRemoveFailuresStep(getNext())), packet);
2425
} else {
25-
return doNext(DomainStatusUpdater.createRemoveFailuresStep(getNext()), packet);
26+
return doNext(createRemoveFailuresStep(getNext()), packet);
2627
}
2728
}
2829

operator/src/main/java/oracle/kubernetes/operator/work/Packet.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public Packet() {
2424
* @param component a component which knows how to add itself to a packet.
2525
*/
2626
public Packet with(PacketComponent component) {
27-
component.addToPacket(this);
27+
if (component != null) {
28+
component.addToPacket(this);
29+
}
2830
return this;
2931
}
3032

operator/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainStatus.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class DomainStatus {
6868
/**
6969
* The number of introspector job failures since the last success.
7070
*
71-
* @deprecated Introspection permanent failure is now controlled by time rather than failure count
71+
* @deprecated Introspection failure is now controlled by a maximum time rather than a failure count
7272
**/
7373
@SuppressWarnings("unused")
7474
@Description(
@@ -331,6 +331,10 @@ public String getReason() {
331331
return reason;
332332
}
333333

334+
private DomainFailureReason getReason(DomainCondition newCondition) {
335+
return newCondition.getReason();
336+
}
337+
334338
/**
335339
* A brief CamelCase message indicating details about why the domain is in this state.
336340
*

0 commit comments

Comments
 (0)