-
Notifications
You must be signed in to change notification settings - Fork 216
Owls104087 (refactored) fix an intermitent failure in ItKubernetesDomainEvents#testK8SEventsDelete #3704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…operation does not wait
/** | ||
* Operator's mapping between custom resource Domain and runtime details about that domain, | ||
* including the scan and the Pods and Services for servers. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Operator's mapping between custom resource Domain and runtime details about that domain -> "Operator's mapping between custom resource cluster and runtime details about that cluster."
private final ClusterResource cluster; | ||
|
||
/** | ||
* Create presence for a domain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create presence for a domain -> Create presence for a cluster.
/** | ||
* Operator's mapping between custom resource Domain and runtime details about that domain, | ||
* including the scan and the Pods and Services for servers. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can either be mapping between the Domain or Cluster custom resource.
final String namespace; | ||
|
||
/** | ||
* Create presence for a domain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be a cluster.
@@ -27,6 +28,10 @@ public ThreadLoggingContext presenceInfo(DomainPresenceInfo info) { | |||
return namespace(info.getNamespace()).domainUid(info.getDomainUid()); | |||
} | |||
|
|||
public ThreadLoggingContext presenceInfo(ClusterPresenceInfo info) { | |||
return namespace(info.getNamespace()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be confusing when there are multiple clusters (potential with same name) in the same namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can have multiple same-named clusters in the same namespace; K8S disallows it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. As we discussed, I meant the name of the cluster itself and not the name of the cluster resource. Should we also include the cluster resource name is the ThreadLoggingContext?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. We probably should if we also want the cluster resource name to be in the logging headers. But we need to do a thorough investigation to identify the log messages that need to have the cluster resource name as a header. I would suggest we do that as a separate task.
import oracle.kubernetes.operator.MakeRightOperation; | ||
|
||
/** | ||
* A factory which creates and executes steps to align the cached domain status with the value read from Kubernetes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cached domain status -> cached domain and cluster status.
import oracle.kubernetes.operator.work.Step; | ||
|
||
/** | ||
* A factory which creates and executes steps to align the cached domain status with the value read from Kubernetes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cached domain status -> cached cluster status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All comments in javadoc have been addressed. thanks.
operator/src/main/java/oracle/kubernetes/operator/DomainProcessorImpl.java
Show resolved
Hide resolved
@@ -337,7 +341,7 @@ public static Step bringAdminServerUp(DomainPresenceInfo info, PodAwaiterStepFac | |||
|
|||
@Override | |||
public void runMakeRight(MakeRightDomainOperation operation) { | |||
final DomainPresenceInfo liveInfo = operation.getPresenceInfo(); | |||
final DomainPresenceInfo liveInfo = (DomainPresenceInfo) operation.getPresenceInfo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding generics to MakeRightOperation to remove the need of this cast. Please see suggested changes at 54122bb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed! |
…ainEvents#testK8SEventsDelete (oracle#3704) * Generate cluster Created/Deleted/Changed events for unreferenced cluster resources Co-authored-by: Anthony Lai <anthony.lai@oracle.com>
…ainEvents#testK8SEventsDelete (#3704) * Generate cluster Created/Deleted/Changed events for unreferenced cluster resources Co-authored-by: Anthony Lai <anthony.lai@oracle.com>
The PR fixes an intermittent issue in nightly where the ClusterDeleted event is missing when deleting a domain and cluster resources. This PR includes all in #3704, plus refactoring of DomainPresenceInfo (see the last item in the list below).
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/14221/