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 premature access to RegistryFactory #8118

Merged
merged 5 commits into from Dec 11, 2023

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Dec 8, 2023

Description

Resolves #8117

The Helidon MP metrics RegistryFactory logged the warning because the JPA CDI extension was running some start-up complete code before the metrics CDI extension had a chance to prepare Helidon MP metrics.

The fix sets the priority on the JPA extension observer to be later than the corresponding priority on the metrics extension observer.

Not as part of the PR I temporarily changed the RegistryFactory code to thrown an exception instead of logging a warning, and the pipelines passed so it seems that no other CDI extensions need a similar adjustment.

@tjquinno tjquinno self-assigned this Dec 8, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 8, 2023
@tjquinno tjquinno marked this pull request as draft December 8, 2023 17:16
@tjquinno tjquinno marked this pull request as ready for review December 11, 2023 17:51
@tjquinno tjquinno changed the title Test premature access to RegistryFactory Fix premature access to RegistryFactory Dec 11, 2023
Copy link
Member

@ljnelson ljnelson left a comment

Choose a reason for hiding this comment

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

Even in my current personal situation I can make sense of this PR. Approved! Look! I Did Work™!

@tjquinno tjquinno merged commit 0d3f313 into helidon-io:main Dec 11, 2023
12 checks passed
@tjquinno tjquinno deleted the 4.x-metrics-check branch December 11, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x: Pokemons example start-up logs that RegistryFactory is retrieved before being initialized
2 participants