-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Initialize hibernate reactive before gRPC #24420
Initialize hibernate reactive before gRPC #24420
Conversation
@@ -183,6 +185,7 @@ void waitForVertxPool(List<VertxPoolBuildItem> vertxPool, | |||
|
|||
@BuildStep | |||
@Record(RUNTIME_INIT) | |||
@Produce(SyntheticBeansRuntimeInitBuildItem.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkouba grpc is initialized after this build item, and it sounds like something that should be safe ;) Do you know if there is build item that could be to express this order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to have explicit dependency between HR and gRPC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's useful in this case but for some other similar purposes we are producing a ServiceStartBuildItem
in Hibernate ORM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I can use it, the GrpcServerProcessor
step that I want to make sure runs after this step is producing ServiceStartBuildItem
itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michalszynkiewicz You can't produce a SyntheticBeansRuntimeInitBuildItem
. It can be only used to make sure a build step is executed AFTER the RUNTIME_INIT
synthetic beans are initialized.
ServiceStartBuildItem
, on the other hand, is used to make sure a build step is exectued before the StartupEvent
is fired.
This starts to look like a choose-your-own-adventure book :). |
yep :D I'll try to propose a PR with #24441 tomorrow or today if I have a while |
@michalszynkiewicz let me try to switch to synthetic beans first as my understanding is that it will fix the issue. |
3083e25
to
9a38fba
Compare
I changed the PR to use a dedicated build item |
Quarkus CI / Native Tests - Messaging1 (pull_request) failure is a failure to start a container - not related to this change |
This comment has been minimized.
This comment has been minimized.
@@ -457,6 +458,7 @@ void gatherGrpcInterceptors(BeanArchiveIndexBuildItem indexBuildItem, | |||
@BuildStep | |||
@Record(value = ExecutionTime.RUNTIME_INIT) | |||
@Consume(SyntheticBeansRuntimeInitBuildItem.class) | |||
@Consume(BeanInitializedBuildItem.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, how does @Consume
behave in case of a MultiBuildItem
? I mean is the behavior equivalent to a List<BeanInitializedBuildItem>
param?
CC @dmlloyd
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BeanInitializedBuildItem.java
Outdated
Show resolved
Hide resolved
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/BeanInitializedBuildItem.java
Outdated
Show resolved
Hide resolved
9a38fba
to
5e99256
Compare
5e99256
to
99a86ae
Compare
No description provided.