-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug]: Cannot parse Date when deserializing com.github.dockerjava.api.model.Network object #9542
Comments
This issue has been fixed in jackson-databind 2.9.1 |
Do you mean the Jackson library shaded in testcontainers embeds a prior version with that bug? |
Yes, testcontainers includes an outdated version of the Jackson library. testcontainers-java/core/build.gradle Line 66 in f7267c7
Thus, Testcontainers should provide a fix. |
In the meantime, you can update the dependency by yourself. I have done that in another project and list network wit no issues. Jackson version has not been updated to keep compatibility with other projects using older versions, see #3433. |
@eddumelendez |
shaded dependencies can not be overridden. jackson dependencies are shaded and transitives dependencies in testcontainers. So, what I meant is just updating the transitives dependencies. |
Looks like I hit the same bug. |
Module
Core
Testcontainers version
1.20.3
Using the latest Testcontainers version?
Yes
Host OS
Ubuntu 20.04
Host Arch
x86_64
Docker version
Client: Version: 24.0.7 API version: 1.43 Go version: go1.21.1 Git commit: 24.0.7-0ubuntu2~20.04.1 Built: Wed Mar 13 20:29:24 2024 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.21.1 Git commit: 24.0.7-0ubuntu2~20.04.1 Built: Wed Mar 13 20:29:24 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.12 GitCommit: runc: Version: 1.1.12-0ubuntu2~20.04.1 GitCommit: docker-init: Version: 0.19.0 GitCommit:
What happened?
We have some integration tests written in Junit5 brining up a GenericContainer for end-to-end tests between components. When the tests are run in a host process the GenericContainer object is created successfully, but when tests are run within a container (like in Jenkins) the GenericContainer fails to build, throwing the exception reported in the log pane.
Debugging the code, it seems the GenericContainer fails to deserialize dates in com.github.dockerjava.api.model.Network object when inspecting the docker network. The date format returned with docker network inspect is indeed "2024-11-13T21:04:48.309416219+0100", but apparently the BaseSettings initialized in ObjectMapper uses a StdDateFormat that is not able to parse it.
Reverting the dependency to testcontainers 1.17.6 made it work. I think this could be a regression.
Relevant log output
Additional Information
No response
The text was updated successfully, but these errors were encountered: