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

Fix issue with default beans resolution #20263

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

stuartwdouglas
Copy link
Member

If there is more than one Foo for Instance then default beans are
included in the result list. This result in HTTP basic auth always being
enabled if there is more than one authenticator.

@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Sep 20, 2021
@mkouba
Copy link
Contributor

mkouba commented Sep 20, 2021

Well, the behavior of javax.enterprise.inject.Instance#iterator() is a bit unclear, esp. when it comes to ambiguous dependencies. The iterator() method should "resolve ambiguities", but it's not 100% what this actually means.

Use case 1 - ambiguous dependency exists, but no alternative beans, e.g. Foo implements Bar and Baz implements Bar
and @Inject Instance<Bar>. It's a common practice that Instance#iterator() returns both Foo and Baz, i.e. no AmbiguousResolutionException is thrown even though the dependency is not resolvable. But if we return [Foo,Baz] then ambiguities were not truly resolved...

Use case 2 - ambiguous dependency exists, some alternative beans, e.g. Foo implements Bar and @Alternative Baz implements Bar and @Alternative Alpha implements Bar and @Inject Instance<Bar>. Should Instance#iterator() return [Foo,Baz,Alpha] or [Baz,Alpha]?

Now if @DefaultBean gets into the mix things are even more complicated.

My point is that we should probably define the desired behavior first and document this in the io.quarkus.arc.InjectableInstance javadoc as well.

CC @manovotn @Ladicek

@stuartwdouglas
Copy link
Member Author

Well at the moment the behavior is inconsistent. If you have 2 beans, one a default and one not then only the non-default bean will be returned. If you have 3 beans, one default and 2 not then all 3 are returned.

Security relies on this behavior to allow things to be overridden by the user, however in all the tests we were only adding a single new implementation so this was not picked up.

@manovotn
Copy link
Contributor

@mkouba @stuartwdouglas
I agree that the spec text is not helping here as it sounds contradictory.
However, looking at CDI TCKs, there are two tests covering this, one without alternatives and one with alternatives.
See https://github.com/eclipse-ee4j/cdi-tck/blob/2.0/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/dynamic/DynamicLookupTest.java#L139-L191

If you go over them, you'll see that the general idea is that you don't throw unsatisfied/ambig exception but you perform bean resolution taking alternatives into consideration. Therefore:

Use case 1

This should return [Foo,Baz].

Use case 2

This should return [Baz,Alpha] is and only if they have equal priority. Otherwise, you only return the one with highest priority.

Now if @DefaultBean gets into the mix things are even more complicated.

This can IMO logically follow the train of thoughts above. E.g. you only ever list default bean if it hasn't been replaced by either standard bean or enabled alternative.

@mkouba
Copy link
Contributor

mkouba commented Sep 20, 2021

Well at the moment the behavior is inconsistent...

Yes, it is. My point is that this fix will make it "less inconsistent" but still inconsistent.

I think that we should copy the behavior from Weld, i.e. return the set of "disambiguated beans". I.e. attempt to resolve ambiguities and return the "best" result we have.

@mkouba
Copy link
Contributor

mkouba commented Sep 20, 2021

@stuartwdouglas Let me just try to show what I mean on top of your commit...

@Ladicek
Copy link
Contributor

Ladicek commented Sep 20, 2021

I personally think that this PR makes sense, but I wonder -- is it possible to have more than 1 default bean for given bean type? :-)

@mkouba
Copy link
Contributor

mkouba commented Sep 20, 2021

I personally think that this PR makes sense, but I wonder -- is it possible to have more than 1 default bean for given bean type? :-)

In theory yes, or at least it's not forbidden. And I will have this use case covered in my commit.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2021

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

Failing Jobs - Building 0bf9e56

Status Name Step Failures Logs Raw logs
Initial JDK 11 Build Build Failures Logs Raw logs

Failures

⚙️ Initial JDK 11 Build #

- Failing: independent-projects/arc/runtime 
! Skipped: core/test-extension/deployment core/test-extension/runtime devtools/bom-descriptor-json and 613 more

📦 independent-projects/arc/runtime

Failed to execute goal net.revelc.code:impsort-maven-plugin:1.6.2:check (check-imports) on project arc: Imports are not sorted in /home/runner/work/quarkus/quarkus/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/InjectableInstance.java

@mkouba mkouba force-pushed the default-beans-resolution branch from 0bf9e56 to 0a639a9 Compare September 20, 2021 09:45
Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

This is now IMO behaving accordingly to specification plus takes care of default beans in a sensible way.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2021

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

Failing Jobs - Building 0a639a9

Status Name Step Failures Logs Raw logs
Devtools Tests - JDK 11 Build Failures Logs Raw logs
Devtools Tests - JDK 11 Windows Build Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs
Native Tests - Spring Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Devtools Tests - JDK 11 #

- Failing: integration-tests/devtools 

📦 integration-tests/devtools

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-java-030fd1bc-d446-41aa-b5e5-5d3f385dcaa2

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-kotlin-69b418f6-b95b-4600-b164-1cd4852339b4

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

⚙️ Devtools Tests - JDK 11 Windows #

- Failing: integration-tests/devtools 

📦 integration-tests/devtools

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-java-92a33d7a-15d6-472b-8664-b06637d26e21

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-kotlin-60670209-3616-429d-ace1-be4b5219c22b

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.MultiModuleIncludedBuildTest.main line 24 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.MultiModuleIncludedBuildTest.main line 24 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/smallrye-health/deployment integration-tests/spring-web 
! Skipped: docs extensions/agroal/deployment extensions/elytron-security-jdbc/deployment and 127 more

📦 extensions/smallrye-health/deployment

io.quarkus.smallrye.health.test.HealthCheckDefaultScopeTest.testHealth line 42 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
JSON path checks.name doesn't match.

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ JVM Tests - JDK 11 Windows #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ JVM Tests - JDK 16 #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ Native Tests - Spring #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerIT.testInvalidJsonInputAndResult - More details - Source on GitHub

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

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2021

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

Failing Jobs - Building 436ed76

Status Name Step Failures Logs Raw logs
Devtools Tests - JDK 11 Build Failures Logs Raw logs
Devtools Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs
MicroProfile TCKs Tests Verify ⚠️ Check → Logs Raw logs
Native Tests - Spring Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Devtools Tests - JDK 11 #

- Failing: integration-tests/devtools 

📦 integration-tests/devtools

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-java-fcccd14c-4d87-49ed-bc67-dd8cffe27996

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-kotlin-a62ee875-9e5a-4fc7-9675-04ef1b194a2f

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

⚙️ Devtools Tests - JDK 11 Windows #

- Failing: integration-tests/devtools 

📦 integration-tests/devtools

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsKotlin line 61 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsScala line 66 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[1] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[2] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradle(String)[3] line 73 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testRunTogetherCodestartsJava line 56 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[1] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[2] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartBuildIT.testGradleKotlinDSL(String)[3] line 80 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

expected: 0

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-java-a262014d-0243-4bfd-851e-b8857ebd531e

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

📦 integration-tests/devtools/target/quarkus-codestart-build-test/project-maven-kotlin-ba96a30c-8bf9-4bb4-ab4e-174f6a483f06

org.acme.GreetingControllerTest.testHelloEndpoint - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same...

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/amazon-lambda/deployment integration-tests/spring-web 
! Skipped: docs extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 6 more

📦 extensions/amazon-lambda/deployment

io.quarkus.amazon.lambda.deployment.testing.LambdaDevServicesContinuousTestingTestCase.testLambda line 41 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ JVM Tests - JDK 16 #

- Failing: extensions/amazon-lambda/deployment integration-tests/spring-web 
! Skipped: docs extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 6 more

📦 extensions/amazon-lambda/deployment

io.quarkus.amazon.lambda.deployment.testing.LambdaDevServicesContinuousTestingTestCase.testLambda line 41 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ Native Tests - Spring #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerIT.testInvalidJsonInputAndResult - More details - Source on GitHub

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

@stuartwdouglas stuartwdouglas force-pushed the default-beans-resolution branch from 436ed76 to d442730 Compare September 21, 2021 00:04
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 21, 2021

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

Failing Jobs - Building d442730

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs
Native Tests - Spring Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/amazon-lambda/deployment integration-tests/spring-web 
! Skipped: docs extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 6 more

📦 extensions/amazon-lambda/deployment

io.quarkus.amazon.lambda.deployment.testing.LambdaDevServicesContinuousTestingTestCase.testLambda line 41 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ JVM Tests - JDK 16 #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerTest.testInvalidJsonInputAndResult line 37 - More details - Source on GitHub

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

⚙️ Native Tests - Spring #

- Failing: integration-tests/spring-web 

📦 integration-tests/spring-web

io.quarkus.it.spring.web.SpringControllerIT.testInvalidJsonInputAndResult - More details - Source on GitHub

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

@mkouba
Copy link
Contributor

mkouba commented Sep 21, 2021

@stuartwdouglas Why did you remove my commit? Anyway, those test failures are probably not related - e.g. I wasn't able to reproduce the SpringControllerTest.testInvalidJsonInputAndResult() failure locally.

Copy link
Contributor

@mkouba mkouba left a comment

Choose a reason for hiding this comment

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

The current fix is not entirely correct.

stuartwdouglas and others added 2 commits September 21, 2021 17:57
If there is more than one Foo for Instance<Foo> then default beans are
included in the result list. This result in HTTP basic auth always being
enabled if there is more than one authenticator.
- also fix HealthCheckDefaultScopeTest
@stuartwdouglas stuartwdouglas force-pushed the default-beans-resolution branch from d442730 to 7d7c9fb Compare September 21, 2021 07:57
@stuartwdouglas
Copy link
Member Author

oops, I must have screwed up the rebase, sorry, I have fixed.

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Sep 21, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 21, 2021

Failing Jobs - Building 7d7c9fb

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.BasicKotlinApplicationModuleDevModeTest.main line 18 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:166)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

@gastaldi
Copy link
Contributor

Test failure is unrelated and flaky (it passes locally for me)

@gastaldi gastaldi merged commit ebbd26f into quarkusio:main Sep 21, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 21, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Sep 21, 2021
@gsmet gsmet modified the milestones: 2.3.0.CR1, 2.2.4.Final Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/health area/smallrye
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants