quarkus: MongoClientBuildItem is never produced
Describe the bug
MongoClientProcessor has a build method which is supposed to produce MongoClientBuildItem(s) when the relevant Quarkus Mongo configuration is present. I never see the fields in MongodbConfig be anything other than null, hence the build items never get created.
Having MongoClientBuildItem available, is useful for other extensions like the Camel Mongo extension, where it can fetch the client and wire it into the relevant Camel component.
Expected behavior
If any of the Mongo configuration options are set, E.g quarkus.mongodb.hosts or quarkus.mongodb.connection-string then a MongoClientBuildItem should be produced.
Actual behavior
No MongoClientBuildItem ever seems to be produced, regardless of the Mongo configuration used.
To Reproduce Steps to reproduce the behavior:
- In your IDE, set a breakpoint in
MongoClientProcessorat the start of thebuildmethod - Launch test
BookResourceTestin debug mode - Observe conditions for creating
MongoClientBuildItemare never satisfied
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 33 (33 by maintainers)
Commits related to this issue
- Fix broken MongoClientBuildItem support Fixes: #7378 — committed to geoand/quarkus by geoand 4 years ago
- Fix broken MongoClientBuildItem support Fixes: #7378 — committed to geoand/quarkus by geoand 4 years ago
- Merge pull request #7385 from geoand/#7378 Fix broken MongoClientBuildItem support — committed to quarkusio/quarkus by gsmet 4 years ago
@loicmathieu, @dufoli your concern has been addressed as well.
With the current version of the PR we all get what we want:
MongoClientBuildItem(which doesn’t happen by default - Camel is only consumer I know of).So we should all be happy with this iteration 😄
@jamesnetherton I just pushed a new iteration of the PR.
Everything should now be back to normal from your POV. I would appreciate it if you gave a go
Yeah most likely. Let me create a draft PR soon with what I have in mind and then you and the Camel folks can try something concrete and see if it’s fits your needs 😃