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

Add @ConfigItem#generateDocumentation to enable/disable generation of documentation #26126

Merged
merged 1 commit into from Jun 16, 2022

Conversation

yrodiere
Copy link
Member

In order to address #19129, I had to introduce a configuration property in both the build config and runtime config, because the same Map<String, String> configuration can affect static init (when building the Hibernate ORM metadata) or runtime init (when building the Hibernate ORM session factory), depending on the keys being used. I don't want to expose two separate configuration properties because that would complicate an already complex (and unsupported) feature.

The problem is, documentation is generated for the same configuration property twice: once for the build config, and once for the runtime config. This leads to problems when rendering the asciidoc (duplicate section IDs, in particular).

My solution: annotate the build-time configuration property with @ConfigItem(generateDocumentation = false), so that we generate documentation only for the runtime configuration property. It works 🤷

@yrodiere
Copy link
Member Author

I could not find where to add tests for @ConfigItem, but I suppose it's fine, since my next PR #26128 relies on this new feature and thus indirectly tests it anyway?

@quarkus-bot

This comment has been minimized.

@yrodiere
Copy link
Member Author

I can reproduce the Gradle test failures in my logs, but the cause seems unrelated to my changes:

Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not HEAD 'https://repo.gradle.org/artifactory/jcenter/io/quarkus/quarkus-build-parent/999-SNAPSHOT/quarkus-build-parent-999-SNAPSHOT.pom'. Received status code 409 from server: Conflict

I'm investigating why in the world we'd be looking for this artifact on the JCenter mirror inside the Gradle Maven repository...

@yrodiere
Copy link
Member Author

See #26140 regarding the Gradle failures. They indeed seem unrelated to my changes.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jun 16, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 16, 2022

Failing Jobs - Building 95ec09c

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/resteasy-reactive/quarkus-resteasy-reactive-jaxb/deployment 
! Skipped: extensions/resteasy-reactive/rest-client-reactive-jaxb/deployment integration-tests/hibernate-validator-resteasy-reactive 

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive-jaxb/deployment

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testModelWithoutAnnotationAtWrite line 150 - More details - Source on GitHub

java.lang.IllegalStateException: Cannot parse object because no supported Content-Type was specified in response. Content-Type was 'text/html; charset=utf-8'.
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testXml line 45 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testAsyncXml line 126 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
JSON path person.first doesn't match.

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testModelWithoutAnnotationAtRead line 135 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWithoutAnnotation), not marked as ignorable (one known property: "message"])
 at [Source: (String)"{"details":"Error id 91094925-ec13-4b8f-afee-fc2f9d35aacb-4, java.lang.RuntimeException: javax.xml.bind.MarshalException","stack":"java.lang.RuntimeException: javax.xml.bind.MarshalException\n - with linked exception:\n[com.sun.istack.SAXException2: javax.xml.bind.JAXBException: io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWithoutAnnotation is not known to this context\njavax.xml.bind.JAXBException: io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWith"[truncated 9850 chars]; line: 1, column: 13] (through reference chain: io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWithoutAnnotation["details"])

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testLargeXmlPost line 84 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testValidatedXml line 101 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

⚙️ JVM Tests - JDK 17 #

- Failing: extensions/resteasy-reactive/quarkus-resteasy-reactive-jaxb/deployment integration-tests/grpc-hibernate 
! Skipped: extensions/resteasy-reactive/rest-client-reactive-jaxb/deployment integration-tests/hibernate-validator-resteasy-reactive 

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive-jaxb/deployment

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testModelWithoutAnnotationAtWrite line 150 - More details - Source on GitHub

java.lang.IllegalStateException: Cannot parse object because no supported Content-Type was specified in response. Content-Type was 'text/html; charset=utf-8'.
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testXml line 45 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testAsyncXml line 126 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
JSON path person.first doesn't match.

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testModelWithoutAnnotationAtRead line 135 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWithoutAnnotation), not marked as ignorable (one known property: "message"])
 at [Source: (String)"{"details":"Error id 62f80393-af1d-40d0-a6ff-4c7e44bb4e94-4, java.lang.RuntimeException: javax.xml.bind.MarshalException","stack":"java.lang.RuntimeException: javax.xml.bind.MarshalException\n - with linked exception:\n[com.sun.istack.SAXException2: javax.xml.bind.JAXBException: io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWithoutAnnotation is not known to this context\njavax.xml.bind.JAXBException: io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWith"[truncated 9850 chars]; line: 1, column: 13] (through reference chain: io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest$ModelWithoutAnnotation["details"])

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testLargeXmlPost line 84 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

io.quarkus.resteasy.reactive.jaxb.deployment.test.SimpleXmlTest.testValidatedXml line 101 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

📦 integration-tests/grpc-hibernate

com.example.grpc.hibernate.BlockingRawTest.shouldAdd line 61 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with com.example.grpc.hibernate.BlockingRawTest was not fulfilled within 30 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

@gsmet gsmet merged commit e09da15 into quarkusio:main Jun 16, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jun 16, 2022
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jun 16, 2022
@gsmet
Copy link
Member

gsmet commented Jun 16, 2022

The failures are not related.

@yrodiere yrodiere deleted the generate-documentation branch August 2, 2022 08:33
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.

None yet

2 participants