Skip to content

Conversation

@alai8
Copy link
Member

@alai8 alai8 commented Jun 10, 2022

Cause:
Test intentionally patches domain with non-existing pvc with updated introspectVersion to trigger introspection.
It then patches domain with correct pvc and updated introspectVersion to trigger another introspection.
However, the introspection pod for the first introspector job with non-existing pvc sometimes stayed in PENDING phase for a long time,
with condition type PODSCHEDULED and reason Unschedulable.
This causes the introspection for the corrected pvc to not run before the test timed out waiting for the Completed event.

Fix:
In VerifyIntrospectorJobResponseStep, if the job read from the readJob call is a job for a different introspectVersion,
delete the current job and restart new one.
This involves adding weblogic.introspectVersion label to the metadata of the introspector job.

Update introspectVersion documentation to mention that its value must be a valid label value in Kubernetes, since operator also uses introspectVersion in metadata labels in weblogic-domain-introspect-cm ConfigMap and server pods.

Test testIntrospectDomainScript() in ItIntrospectVersion is using an invalid introspectVersion value of "My Version". It is updated to use a valid value of "My_Version-1".

jenkins: https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/10963/

Copy link
Member

@doxiao doxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one minor nit.

My observation is that the test case used to fail occasionally, but started to fail consistently recently. I am curious about if we have an explanation for that.

}

@Test
void whenJobInProgressAndINullIntrospectVersionUnchanged_doNotCreateNewJob() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the method name - xxxAndINullInxxx.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks.

@alai8
Copy link
Member Author

alai8 commented Jun 10, 2022

My observation is that the test case used to fail occasionally, but started to fail consistently recently. I am curious about if we have an explanation for that.

When the test passes, I notice that the introspector pod with invalid pvc would fail after DeadlineExceeded and thus the introspection with the corrected pvc could start.
But I do not know why this doesn't happen consistently, or why the test has been failing more frequently.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@rjeberhard rjeberhard merged commit e86d42b into main Jun 10, 2022
@rjeberhard rjeberhard deleted the owls-99679 branch June 10, 2022 16:53
rjeberhard pushed a commit to rjeberhard/weblogic-kubernetes-operator that referenced this pull request Apr 14, 2023
…ngFailed test failure (oracle#3158)

* restart introspector job if existing job is for a different introspectVersion
robertpatrick pushed a commit that referenced this pull request Apr 26, 2023
…ngFailed test failure (#3158)

* restart introspector job if existing job is for a different introspectVersion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants