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

Properly handle case when quarkus-extension.yaml doesn't exist #42561

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Aug 14, 2024

We need to catch the NoSuchFileException and ignore it.

Per gripe from Marco Bungart in the Quarkus Artemis project.

We need to catch the NoSuchFileException and ignore it.

Per gripe from Marco Bungart in the Quarkus Artemis project.
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

@quarkus-bot

This comment has been minimized.

@turing85
Copy link
Contributor

Nice! Thanks for the fast fix 🙂

@gastaldi gastaldi added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 15, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 15, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 2c87bb5.

✅ 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.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

🎊 PR Preview 1466fcc has been successfully built and deployed to https://quarkus-pr-main-42561-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 15, 2024

Status for workflow Quarkus CI

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

✅ 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.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 integration-tests/kotlin

io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange - History

  • org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes. - java.lang.RuntimeException
java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:86)
	at io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange(KotlinRemoteDevModeIT.java:23)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)

@gsmet gsmet merged commit cbebd63 into quarkusio:main Aug 15, 2024
62 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Aug 15, 2024
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 15, 2024
@gsmet gsmet modified the milestones: 3.16 - main, 3.14.0 Aug 20, 2024
@Athou
Copy link
Contributor

Athou commented Aug 29, 2024

For some reason, when I run any of my unit tests inside IntelliJ, I get the following warning:

java: Unable to read extension metadata file: META-INF/quarkus-extension.yaml because of java.io.FileNotFoundException: E:\dev\workspace\commafeed\commafeed-server\target\classes\META-INF\quarkus-extension.yaml (The system cannot find the file specified)

In the pom.xml file of my application I have the following to generate the application documentation:

			<plugin>
				<groupId>io.quarkus</groupId>
				<artifactId>quarkus-config-doc-maven-plugin</artifactId>
				<version>${quarkus.version}</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>default-generate-asciidoc</id>
						<phase>process-test-resources</phase>
						<goals>
							<goal>generate-asciidoc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
...
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-extension-processor</artifactId>
			<version>${quarkus.version}</version>
		</dependency>

Not sure why it's a FileNotFoundException and not a NoSuchFileException. The issue is that I configured maven-compiler-plugin to treat warnings as errors so I can no longer run tests in my IDE since 3.14.

The warning doesn't show up with maven in command-line though, so I suspect IntelliJ is doing something to the classpath.

Any ideas? Would it make sense to also catch and ignore FileNotFoundException?

Thanks!

@gsmet
Copy link
Member Author

gsmet commented Aug 29, 2024

The quarkus-extension-processor is the extension annotation processor. It's not designed to be used by applications.

@Athou
Copy link
Contributor

Athou commented Aug 29, 2024

The quarkus-extension-processor is the extension annotation processor. It's not designed to be used by applications.

Yes, I'm aware 😄 I followed those instructions by @radcortez and it worked until Quarkus 3.13. With 3.14, the asciidoc generation has been moved to quarkus-config-doc-maven-plugin but if I understand correctly it needs the output of the quarkus-extension-processor because if I remove it, the plugin no longer generates anything.

I realize this documentation mechanism was intended for quarkus extensions and wasn't intended for applications but it's really useful to generate the documentation as it is less error prone than to maintain it manually.

@gsmet
Copy link
Member Author

gsmet commented Aug 29, 2024

#42853 should take care of your issues. I'll backport it to 3.14.2. Thanks for reporting!

gsmet added a commit to gsmet/quarkus that referenced this pull request Sep 2, 2024
gsmet added a commit to gsmet/quarkus that referenced this pull request Sep 3, 2024
danielsoro pushed a commit to danielsoro/quarkus that referenced this pull request Sep 20, 2024
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.

4 participants