Skip to content
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

Add waits to DistributedST.java to prevent flaky fails #130

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

jiridanek
Copy link
Collaborator

Resolves

io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://api.crc.testing:6443/apis/workload.codeflare.dev/v1beta1/namespaces/test-codeflare/appwrappers. Message: Not Found.
	at io.fabric8.kubernetes.client.KubernetesClientException.copyAsCause(KubernetesClientException.java:238)
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:507)
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleResponse(OperationSupport.java:524)
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleCreate(OperationSupport.java:340)
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleCreate(BaseOperation.java:754)
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleCreate(BaseOperation.java:98)
	at io.fabric8.kubernetes.client.dsl.internal.CreateOnlyResourceOperation.create(CreateOnlyResourceOperation.java:42)
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.create(BaseOperation.java:1155)
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.create(BaseOperation.java:98)
	at io.fabric8.kubernetes.client.extension.ResourceAdapter.create(ResourceAdapter.java:114)
	at io.odh.test.framework.manager.ResourceManager.createResource(ResourceManager.java:149)
	at io.odh.test.framework.manager.ResourceManager.createResourceWithWait(ResourceManager.java:110)
	at io.odh.test.e2e.standard.DistributedST.lambda$testDistributedWorkload$0(DistributedST.java:99)

and

json parsing error when test tries to parse the 503 page from openshift as json

@jiridanek jiridanek requested a review from jstourac April 17, 2024 09:24
@jiridanek jiridanek marked this pull request as draft April 17, 2024 09:30
A new method, named waitForServiceNotUnavailable, was introduced in TestUtils class. This method uses an HttpClient to poll a given HTTP URL until it receives a response other than a 503 (Service Unavailable). This method was also used in the ModelServingST and DistributedST classes, replacing previously hard-coded segments of code that performed the same action.
@jiridanek jiridanek force-pushed the jd_wait_for_service branch from 2cb7530 to 9d4792f Compare April 17, 2024 09:30
@jiridanek jiridanek marked this pull request as ready for review April 17, 2024 09:44
@kornys kornys merged commit 0a69616 into skodjob:main Apr 17, 2024
3 checks passed
@jiridanek jiridanek deleted the jd_wait_for_service branch April 17, 2024 09:48
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