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

updated k8s client to 21.0.0 #553

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Conversation

munishchouhan
Copy link
Member

This PR will update k8s client to 21.0.0

Signed-off-by: munishchouhan <[email protected]>
@munishchouhan
Copy link
Member Author

Tested in locally, getting this error:

java.lang.NoSuchMethodError: 'void io.kubernetes.client.openapi.models.V1Pod.validateJsonObject(com.google.gson.JsonObject)'
	at io.kubernetes.client.openapi.models.V1Pod$CustomTypeAdapterFactory$1.read(V1Pod.java:309)
	at io.kubernetes.client.openapi.models.V1Pod$CustomTypeAdapterFactory$1.read(V1Pod.java:299)
	at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:308)
	at com.google.gson.Gson.fromJson(Gson.java:1361)
	at com.google.gson.Gson.fromJson(Gson.java:1262)
	at com.google.gson.Gson.fromJson(Gson.java:1171)
	at com.google.gson.Gson.fromJson(Gson.java:1137)
	at io.kubernetes.client.openapi.JSON.deserialize(JSON.java:778)
	at io.kubernetes.client.openapi.ApiClient.deserialize(ApiClient.java:895)
	at io.kubernetes.client.openapi.ApiClient.handleResponse(ApiClient.java:1105)
	at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:1029)
	at io.kubernetes.client.openapi.apis.CoreV1Api.createNamespacedPodWithHttpInfo(CoreV1Api.java:10876)
	at io.kubernetes.client.openapi.apis.CoreV1Api$APIcreateNamespacedPodRequest.execute(CoreV1Api.java:10972)
	at io.seqera.wave.service.k8s.K8sServiceImpl.transferContainer(K8sServiceImpl.groovy:559)
	at io.seqera.wave.service.blob.impl.KubeTransferStrategy.transfer(KubeTransferStrategy.groovy:52)
	at io.seqera.wave.service.blob.impl.BlobCacheServiceImpl.store(BlobCacheServiceImpl.groovy:233)
	at io.seqera.wave.service.blob.impl.BlobCacheServiceImpl.storeIfAbsent(BlobCacheServiceImpl.groovy:195)
	at io.seqera.wave.service.blob.impl.BlobCacheServiceImpl.retrieveBlobCache(BlobCacheServiceImpl.groovy:111)
	at io.seqera.wave.controller.RegistryProxyController.fromDownloadResponse(RegistryProxyController.groovy:321)
	at io.seqera.wave.controller.RegistryProxyController.handleDelegate0(RegistryProxyController.groovy:225)
	at io.seqera.wave.controller.RegistryProxyController.handleGet0(RegistryProxyController.groovy:194)
	at io.seqera.wave.controller.RegistryProxyController.handleGet(RegistryProxyController.groovy:135)
	at io.seqera.wave.controller.$RegistryProxyController$Definition$Exec.dispatch(Unknown Source)
	at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invoke(AbstractExecutableMethodsDefinition.java:371)
	at io.micronaut.context.DefaultBeanContext$4.invoke(DefaultBeanContext.java:594)
	at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:303)
	at io.micronaut.web.router.RouteMatch.execute(RouteMatch.java:111)
	at io.micronaut.http.context.ServerRequestContext.with(ServerRequestContext.java:103)
	at io.micronaut.http.server.RouteExecutor.lambda$executeRoute$14(RouteExecutor.java:659)
	at reactor.core.publisher.FluxDeferContextual.subscribe(FluxDeferContextual.java:49)
	at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:62)
	at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194)
	at io.micronaut.reactive.reactor.instrument.ReactorInstrumentation.lambda$init$0(ReactorInstrumentation.java:62)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
	at io.micrometer.core.instrument.composite.CompositeTimer.recordCallable(CompositeTimer.java:129)
	at io.micrometer.core.instrument.Timer.lambda$wrap$1(Timer.java:206)
	at io.micronaut.scheduling.instrument.InvocationInstrumenterWrappedCallable.call(InvocationInstrumenterWrappedCallable.java:53)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1589)

@munishchouhan
Copy link
Member Author

issue created
kubernetes-client/java#3539

@munishchouhan
Copy link
Member Author

Still not working
error:


io.seqera.wave.exception.BadRequestException: Unexpected build failure - {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"build-090844c190db1409-1\" is forbidden: pod rejected: Pod Overhead set without corresponding RuntimeClass defined Overhead","reason":"Forbidden","details":{"name":"build-090844c190db1409-1","kind":"pods"},"code":403}

	at io.seqera.wave.service.builder.KubeBuildStrategy.build(KubeBuildStrategy.groovy:114)
	at io.seqera.wave.service.builder.ContainerBuildServiceImpl.launch(ContainerBuildServiceImpl.groovy:203)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:1036)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1019)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:97)
	at io.seqera.wave.service.builder.ContainerBuildServiceImpl$_launchAsync_lambda2.doCall(ContainerBuildServiceImpl.groovy:249)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at io.micronaut.scheduling.instrument.InvocationInstrumenterWrappedRunnable.run(InvocationInstrumenterWrappedRunnable.java:47)
	at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141)
	at io.micrometer.core.instrument.Timer.lambda$wrap$0(Timer.java:196)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: io.kubernetes.client.openapi.ApiException: Message: 
HTTP response code: 403
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"build-090844c190db1409-1\" is forbidden: pod rejected: Pod Overhead set without corresponding RuntimeClass defined Overhead","reason":"Forbidden","details":{"name":"build-090844c190db1409-1","kind":"pods"},"code":403}

HTTP response headers: {audit-id=[1b220415-0563-49cf-acab-21433e63b505], cache-control=[no-cache, private], content-length=[304], content-type=[application/json], date=[Fri, 12 Jul 2024 16:35:00 GMT], x-kubernetes-pf-flowschema-uid=[2e5d4335-8d18-47e8-8ccc-d5cff84dadc7], x-kubernetes-pf-prioritylevel-uid=[5f6328bd-868a-4cbb-85be-c907b3ddac78]}
	at io.kubernetes.client.openapi.ApiClient.handleResponse(ApiClient.java:1116)
	at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:1029)
	at io.kubernetes.client.openapi.apis.CoreV1Api.createNamespacedPodWithHttpInfo(CoreV1Api.java:10876)
	at io.kubernetes.client.openapi.apis.CoreV1Api$APIcreateNamespacedPodRequest.execute(CoreV1Api.java:10972)
	at io.seqera.wave.service.k8s.K8sServiceImpl.buildContainer(K8sServiceImpl.groovy:340)
	at io.seqera.wave.service.builder.KubeBuildStrategy.build(KubeBuildStrategy.groovy:102)
	... 18 common frames omitted

Signed-off-by: munishchouhan <[email protected]>
@munishchouhan
Copy link
Member Author

found the solution here
quarkusio/quarkus#39934 (comment)

@munishchouhan
Copy link
Member Author

A new issue emerges with this upgrade is how to find pods associated with jobs, because new functions doesnot have filed to mentioned the jobname when fetching pods

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.

1 participant