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

Avoid exception wrapping when native image build error #19294

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Aug 9, 2021

@stuartwdouglas this was part of a larger work to get the errors of the native image build injected into the exception so I could grab them with the bot.

Unfortunately, when I'm not using inherit IO to be able to get the output, the output is all garbled. It seems our existing infra doesn't support disabling IO inheritance very well. Not sure if it's the ErrorReplacingProcessReader competing with the ones of ProcessUtil or if it's something more involved.

I wasn't too sure also if it would work well with Gradle to not inherit the IO.

I'll see if I can put more time into it but it you have ideas, I'm all ears.

@quarkus-bot quarkus-bot bot added the area/core label Aug 9, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 9, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 0a1cb72

Status Name Step Test failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
✔️ JVM Tests - JDK 16
Native Tests - Data4 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 extensions/scheduler/deployment

io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod line 63 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: Count=0 ==> expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:193)
	at io.quarkus.scheduler.test.metrics.MicrometerTimedTest.testTimedMethod(MicrometerTimedTest.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:363)
	at io.quarkus.test.QuarkusUnitTest.interceptTestMethod(QuarkusUnitTest.java:331)
	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.la...

⚙️ Native Tests - Data4 #

📦 integration-tests/mongodb-rest-data-panache

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheIT.shouldNotCreateOrDeleteAuthor - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.mongodb.deployment.DevServicesMongoProcessor#startMongo threw an exception: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:330)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:311)
	at io.quarkus.mongodb.deployment.DevServicesMongoProcessor.startMongo(DevServicesMongoProcessor.java:167)
	at io.quarkus.mongodb.deployment.DevServicesMongoProcessor.startMongo(DevServicesMongoProcessor.java:88)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43...

@stuartwdouglas
Copy link
Member

I just did some testing and I don't think ErrorReplacingProcessReader actually works any more, so feel free to remove it.

@stuartwdouglas
Copy link
Member

Also in terms of the output being garbled is it STDERR and STDOUT appearing in the wrong order? Because they are read by different threads they can easily end up in a different order to what they would appear in the terminal.

@gsmet gsmet requested a review from geoand August 23, 2021 17:10
@gsmet gsmet force-pushed the avoid-exception-wrapping-2 branch from 0a1cb72 to 3f96b18 Compare December 18, 2021 12:47
@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 18, 2021
@gsmet gsmet merged commit e866c8e into quarkusio:main Dec 18, 2021
@quarkus-bot quarkus-bot bot added this to the 2.7 - main milestone Dec 18, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 18, 2021
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