Skip to content

Add jackson-databind as a dependency of core-deployment #48890

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

radcortez
Copy link
Member

There is a need to provide a JSON reader / writer (possible with data binding) to our deployment phase.

We do have internal implementations sitting here:

Mostly used to handle native image resources and build time metrics.

We now also have a json file that describes our configuration metadata (for tooling), but that we would benefit if consumed by our own build.

The proposal is to pick a popular JSON library to handle these uses cases instead of maintaining our own implementation. Since this is for the deployment phase only, it shouldn't leak to the runtime application, but it will be available in the test class path due to core-deployment being included in quarkus-junit5.

Additional discussion from Zulip: https://quarkusio.zulipchat.com/#narrow/channel/187038-dev/topic/JSON.20dependency.20in.20the.20core.20deployment.3F/with/526854010

Copy link

quarkus-bot bot commented Jul 11, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit f7ba3ca.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/smallrye-reactive-messaging/deployment

io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector - History

  • Expecting actual: ["-6","-7","-8","-10","-11","-12","-13","-14"] to start with: ["-6", "-7", "-8", "-9"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-6","-7","-8","-10","-11","-12","-13","-14"]
to start with:
  ["-6", "-7", "-8", "-9"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:41)

⚙️ JVM Integration Tests - JDK 17

📦 integration-tests/kafka-devservices

io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange - History

  • New containers: [Container(command=sh -c 'while [ ! -f /work/run.sh ]; do sleep 0.1; done; sleep 0.1; /work/run.sh', created=1752255534, id=79c798b83e7823700d1a8352b5ebbfb4039dbb4f7c91c6911318a08a1015526b, image=quay.io/ogunalp/kafka-native:latest, imageId=sha256:99fa71388449ac7ff46bda7f6d645fb4435d9a21dce3d4dbcaedfc8a738afd6b, names=[/infallible_elgamal], ports=[ContainerPort(ip=0.0.0.0, privatePort=9092, publicPort=32857, type=tcp), ContainerPort(ip=::, privatePort=9092, publicPort=32857, type=tcp)], labels={architecture=x86_64, build-date=2025-03-25T21:45:00Z, com.redhat.component=ubi9-micro-container, com.redhat.license_terms=https://www.redhat.com/en/about/red-hat-end-user-license-agreements\#UBI, description=Very small image which doesn't install the package manager., distribution-scope=public, io.buildah.version=1.39.0-dev, io.k8s.description=Very small image which doesn't install the package manager., io.k8s.display-name=Red Hat Universal Base Image 9 Micro, io.openshift.expo... - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: 
New containers: [Container(command=sh -c 'while [ ! -f /work/run.sh ]; do sleep 0.1; done; sleep 0.1; /work/run.sh', created=1752255534, id=79c798b83e7823700d1a8352b5ebbfb4039dbb4f7c91c6911318a08a1015526b, image=quay.io/ogunalp/kafka-native:latest, imageId=sha256:99fa71388449ac7ff46bda7f6d645fb4435d9a21dce3d4dbcaedfc8a738afd6b, names=[/infallible_elgamal], ports=[ContainerPort(ip=0.0.0.0, privatePort=9092, publicPort=32857, type=tcp), ContainerPort(ip=::, privatePort=9092, publicPort=32857, type=tcp)], labels={architecture=x86_64, build-date=2025-03-25T21:45:00Z, com.redhat.component=ubi9-micro-container, com.redhat.license_terms=https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI, description=Very small image which doesn't install the package manager., distribution-scope=public, io.buildah.version=1.39.0-dev, io.k8s.description=Very small image which doesn't install the package manager., io.k8s.display-name=Red Hat Universal...

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/kafka-devservices

io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:231)
	at io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange(DevServicesDevModeTest.java:81)

@gsmet
Copy link
Member

gsmet commented Jul 11, 2025

Let’s discuss it next week because it leaking to the test classpath is not ideal.

@radcortez
Copy link
Member Author

There is no way around this, since core-deployment is required to build the test.

@gastaldi
Copy link
Contributor

Not required to be done in this PR, but if Jackson gets in core deployment, perhaps the JSON classes in core/builder/src/main/java/io/quarkus/builder/Json.java should be deprecated or removed?

@radcortez
Copy link
Member Author

Perhaps... the builder module could be used outside the core, so Jackson wouldn't be available to those who only depend only on the builder. Another option is to move Jackson to the builder directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants