-
Notifications
You must be signed in to change notification settings - Fork 446
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
Upgrade spotify docker-client to 3.2.1 #693
Conversation
Using the spotify docker client in Play 2.4.x projects leads to jackson errors like : ```[error] (docker:publishLocal) com.spotify.docker.client.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.lang.AbstractMethodError: com.fasterxml.jackson.jaxrs.base.ProviderBase._configForReading(Lcom/fasterxml/jackson/databind/ObjectReader;[Ljava/lang/annotation/Annotation;)Lcom/fasterxml/jackson/jaxrs/cfg/EndpointConfigBase;``` Upgrading to 3.2.1 fixes it.
Upgrade spotify docker-client to 3.2.1
Thanks a lot for keeping an eye on that. At some point we made refactor these modules out into subpackages to avoid that kind of issues (JDeb, DockerSpotifiy,... ) |
@muuki88 It appears as though this PR has brought in a ton of new dependencies on glassfish artifacts via Spotify's docker-client. I waited considerably longer for the latest native packager to download (1.0.6). Do we really need the spotify client? Should we consider an alternative? When we require docker communication then we just use the process API. Thoughts? |
Perhaps it is also time to consider factoring out Docker into its own plugin. It ain't the only container format. ;-) |
Yeah, I actually planned to factor out the JDeb and Spotify support in it's own plugin which is bound to the release cycle of the sbt-native-packager. I will try to upgrade our build infra today |
FWIW I think jdeb is useful to support building Debian packages in general, and given that Debian is a popular target I'd leave it in there. Docker should absolutely be standalone though. Separately, we should probably avoid the Spotify client for Docker given what it pulls in and just integrate at the process API level. WDYT? |
Keeping jdeb in the core for the first refactoring is fine with me. However we had some issue with jdeb as well, because it was depending on maven2 which introduced a lot of unwanted logging dependencies. So in the long run I would like to factor this out as well.
What do you mean by that? The native-docker plugin integrates the Yesterday I simplified our build, reusing a lot of sbt-plugins out there. My idea would be to separate the build like this lazy val root = project.aggregate(core, dockerSpotify)
lazy val core = project.in(file("core"))
.settings(
name := "sbt-native-packager"
)
lazy val dockerSpotify = project.in(file("docker-spotify"))
.settings(
name := "sbt-native-packager-docker-spotify"
)
.dependsOn(core % "compile->provided") // not quite sure if this works
So that in the end you write in your val nativePackagerVersion = "1.1.0"
addSbtPlugin("com.typesafe.sbt", "sbt-native-packager", nativePackagerVersion)
addSbtPlugin("com.typesafe.sbt", "sbt-native-packager-docker-spotify", nativePackagerVersion) |
Actually, I have a better idea. That it's a lot easier. Marking the dependencies with |
Yeah, I think that could work, although I still think that Docker should be an entirely separate plugin ultimately. :-)
|
I think we should keep it. We only should avoid the dependency mess. There is another sbt-docker plugin, which is pretty nice. However you have to configure everything for your application by yourself. |
Sounds like a plan. :-) |
Using the spotify docker client in Play 2.4.x projects leads to jackson errors like :
[error] (docker:publishLocal) com.spotify.docker.client.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.lang.AbstractMethodError: com.fasterxml.jackson.jaxrs.base.ProviderBase._configForReading(Lcom/fasterxml/jackson/databind/ObjectReader;[Ljava/lang/annotation/Annotation;)Lcom/fasterxml/jackson/jaxrs/cfg/EndpointConfigBase;
Upgrading to 3.2.1 fixes it.