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 - handle types of removed beans more leniently #24398

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Mar 18, 2022

@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Mar 18, 2022
@mkouba
Copy link
Contributor Author

mkouba commented Mar 18, 2022

Note that this modification makes the bytecode of the generated ComponentsProvider.addRemovedBeansX() methods a bit more complex because we wrap every removed bean with a try-catch block and furhermore the caching is less effective in the sense that we need to duplicate the "type loading" logic (previously the logic was only included once per a ComponentsProvider.addRemovedBeansX() method). However, it should not have any memory effects, i.e. the allocations should be the same as before. Also note that the java.lang.reflect.Type cache is now shared accross all ComponentsProvider.addRemovedBeansX() methods.

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.

I've looked at the generated ComponentsProvider class with and without the changes in this PR and I think it looks good!

@mkouba
Copy link
Contributor Author

mkouba commented Mar 18, 2022

I've looked at the generated ComponentsProvider class with and without the changes in this PR and I think it looks good!

Ok, let's run the CI then...

@mkouba mkouba marked this pull request as ready for review March 18, 2022 11:39
@quarkus-bot

This comment has been minimized.

- log a warning if unable to load a bean type of a removed bean
- previously the app failed at startup
- resolves quarkusio#24338
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 18, 2022

Failing Jobs - Building cf38835

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 17 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/grpc-hibernate-reactive 

📦 integration-tests/grpc-hibernate-reactive

com.example.reactive.ReactiveServiceTest.shouldWatchAndAddMultipleTimes - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:632)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:703)

@gsmet
Copy link
Member

gsmet commented Mar 18, 2022

The test above has been flaky lately. /cc @DavideD @michalszynkiewicz

@michalszynkiewicz
Copy link
Member

@mkouba I think the problem is that the order between HibernateReactiveProcessor#setUpPersistenceProviderAndWaitForVertxPool and GrpcServerProcessor#initializeServer is not deterministic.

@michalszynkiewicz
Copy link
Member

This should fix the test failure: #24420 but I'm not able to reproduce it locally (tried 100 times with no failure).

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) kind/bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removal of beans loads referenced classes
4 participants