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

ArC - improve the InterceptorBindingRegistrar API #19064

Merged

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Jul 28, 2021

No description provided.

@mkouba mkouba added this to the 2.2 - main milestone Jul 28, 2021
@quarkus-bot quarkus-bot bot added area/arc Issue related to ARC (dependency injection) area/documentation labels Jul 28, 2021
@mkouba mkouba force-pushed the arc-interceptor-binding-registrar-improvements branch from a1099d0 to 5a2bda2 Compare July 28, 2021 14:11
@mkouba mkouba requested a review from Ladicek July 28, 2021 14:12
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 28, 2021

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

Failing Jobs - Building 5a2bda2

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build Test failures Logs Raw logs
✔️ JVM Tests - JDK 16

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 Windows #

📦 integration-tests/oidc-wiremock

io.quarkus.it.keycloak.BearerOpaqueTokenAuthorizationTest.testSecureAccessSuccessPreferredUsername line 26 - More details - Source on GitHub

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

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCa...

io.quarkus.it.keycloak.BearerOpaqueTokenAuthorizationTest.testDeniedAccessAdminResource line 47 - More details - Source on GitHub

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

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.valid...

io.quarkus.it.keycloak.BearerTokenAuthorizationTest.testBearerTokenWrongIssuer line 86 - More details - Source on GitHub

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

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.valid...

io.quarkus.it.keycloak.BearerTokenAuthorizationTest.testBearerTokenWrongAudience line 97 - More details - Source on GitHub

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

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.valid...

@mkouba
Copy link
Contributor Author

mkouba commented Jul 28, 2021

Hm, there are some BearerOpaqueTokenAuthorizationTest failures on the Windows CI machine:

[io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-1) HTTP Request to /opaque/api/admin/bearer failed, error id: c401aa74-81f0-4bd6-8b95-3d17e026e745-2: java.util.ServiceConfigurationError: org.eclipse.microprofile.context.spi.ThreadContextProvider: io.quarkus.arc.runtime.context.ArcContextProvider not a subtype

I don't think it's related but I'll restart the CI just to be sure...

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 28, 2021
Copy link
Member

@michalszynkiewicz michalszynkiewicz left a comment

Choose a reason for hiding this comment

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

I still don't like that InterceptorBinding extends Predicate but it's just my preference. It's much better than it was :)

@mkouba
Copy link
Contributor Author

mkouba commented Jul 29, 2021

@sberyozkin Hm, those BearerOpaqueTokenAuthorizationTest tests failed again on Windows. Does it ring a bell?

@mkouba mkouba force-pushed the arc-interceptor-binding-registrar-improvements branch from 5a2bda2 to 55e63cc Compare July 29, 2021 06:56
@mkouba
Copy link
Contributor Author

mkouba commented Jul 29, 2021

I still don't like that InterceptorBinding extends Predicate but it's just my preference. It's much better than it was :)

Removed :-). I kept the method name though...

@michalszynkiewicz
Copy link
Member

I still don't like that InterceptorBinding extends Predicate but it's just my preference. It's much better than it was :)

Removed :-). I kept the method name though...

isNonBinding[Field] would be better ;)

@mkouba
Copy link
Contributor Author

mkouba commented Jul 29, 2021

I still don't like that InterceptorBinding extends Predicate but it's just my preference. It's much better than it was :)

Removed :-). I kept the method name though...

isNonBinding[Field] would be better ;)

Hm, you're right. It should be probably isNonbinding(MethodInfo) (given the fact that the annotation is @Nonbinding and the anntation values are actually represented by methods). But I think that the member name, i.e. method.name(), should be enough -> isNonbinding(String). WDYT?

@michalszynkiewicz
Copy link
Member

I still don't like that InterceptorBinding extends Predicate but it's just my preference. It's much better than it was :)

Removed :-). I kept the method name though...

isNonBinding[Field] would be better ;)

Hm, you're right. It should be probably isNonbinding(MethodInfo) (given the fact that the annotation is @Nonbinding and the anntation values are actually represented by methods). But I think that the member name, i.e. method.name(), should be enough -> isNonbinding(String). WDYT?

👍🏻

@mkouba mkouba force-pushed the arc-interceptor-binding-registrar-improvements branch from 55e63cc to 42816c0 Compare July 29, 2021 07:54
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 29, 2021

Failing Jobs - Building 42816c0

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
✔️ JVM Tests - JDK 16

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/kafka-snappy

io.quarkus.it.kafka.KafkaSnappyConsumerTest.test - More details - Source on GitHub

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:712)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:785)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.ju...

@mkouba mkouba merged commit fc01136 into quarkusio:main Jul 29, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 29, 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/documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants