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

Support for 'autoscaling/v1' version in Scale object #292

Open
mzeljkovic opened this issue Sep 20, 2019 · 1 comment
Open

Support for 'autoscaling/v1' version in Scale object #292

mzeljkovic opened this issue Sep 20, 2019 · 1 comment

Comments

@mzeljkovic
Copy link
Contributor

There's a slight difference in Scale object in autoscaling/v1 version where the selector field is a string instead of an object.
This results in ValidationRejection when you attempt to do any of the following calls:
skuber.getScale[ReplicaSet]("myReplicaSet")
skuber.getScale[StatefulSet]("myStatefulSet")

e => JsError(List((/status/selector,List(JsonValidationError(List(error.expected.jsobject),WrappedArray())))))

akka.http.scaladsl.server.RejectionError: ValidationRejection({"obj.status.selector":[{"msg":["error.expected.jsobject"],"args":[]}]},Some(skuber.json.PlayJsonSupportForAkkaHttp$PlayJsonError: {"obj.status.selector":[{"msg":["error.expected.jsobject"],"args":[]}]}))
	at skuber.json.PlayJsonSupportForAkkaHttp.$anonfun$unmarshaller$1(PlayJsonSupportForAkkaHttp.scala:79)
	at play.api.libs.json.JsError.recoverTotal(JsResult.scala:91)
	at skuber.json.PlayJsonSupportForAkkaHttp.read$1(PlayJsonSupportForAkkaHttp.scala:76)
	at skuber.json.PlayJsonSupportForAkkaHttp.$anonfun$unmarshaller$2(PlayJsonSupportForAkkaHttp.scala:83)
	at akka.http.scaladsl.util.FastFuture$.$anonfun$map$1(FastFuture.scala:23)
	at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)
	at akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)
	at akka.http.scaladsl.util.FastFuture$.map$extension(FastFuture.scala:23)
	at akka.http.scaladsl.unmarshalling.Unmarshaller.$anonfun$map$3(Unmarshaller.scala:26)
	at akka.http.scaladsl.unmarshalling.Unmarshaller.$anonfun$transform$3(Unmarshaller.scala:23)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$$anon$1.apply(Unmarshaller.scala:58)
	at akka.http.scaladsl.unmarshalling.LowerPriorityGenericUnmarshallers.$anonfun$messageUnmarshallerFromEntityUnmarshaller$3(GenericUnmarshallers.scala:25)
	at akka.http.scaladsl.unmarshalling.Unmarshaller$$anon$1.apply(Unmarshaller.scala:58)
	at akka.http.scaladsl.unmarshalling.Unmarshal.to(Unmarshal.scala:25)
	at skuber.api.client.impl.KubernetesClientImpl.$anonfun$toKubernetesResponse$1(KubernetesClientImpl.scala:653)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
	at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:92)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:92)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:49)
	at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
@kafis
Copy link

kafis commented Sep 9, 2020

Hey Skuber Team.
I have the same issue, but with Deployment.
Is there any plan or workaround available to make it work?

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

No branches or pull requests

2 participants