-
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
QUARKUS-1490: Use BuildItem to enable use of TestContainers shared network #21863
Conversation
@geoand FYI. |
...io/quarkus/datasource/deployment/spi/DevServicesUseTestContainersSharedNetworkBuildItem.java
Outdated
Show resolved
Hide resolved
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building e19bb68
Failures⚙️ Initial JDK 11 Build #- Failing: extensions/datasource/deployment-spi
! Skipped: devtools/bom-descriptor-json docs extensions/agroal/deployment and 126 more 📦 extensions/datasource/deployment-spi✖ |
I just remembered... We already have |
@geoand I must admit The good The bad The ugly I did point out the behaviour of If the purpose of Happy to help, but will need to be told what you need doing 😃 |
Understood and sorry for the confusion. The existing build item we have is the only one that should be used and it should be consistent throughout - meaning that it should force the launched container onto the shared network. We should get rid of the configuration property and do away with the extra build item added in this PR. Does that make sense? |
@geoand Yes, sure. No problem. I'll make the necessary changes to make the existing |
Indeed! If it doesn't become one, things will fail. Thanks a lot and sorry again for not catching this earlier |
@geoand I've updated this PR and I now re-use the existing I did however have to add a
Anwyay, at the risk of rambling on further this seems a reasonable approach: maintaining the purpose and function of of |
Thanks for the update. I'll have to take a closer look tomorrow on Monday since there are too many things going in parallel that need my attention. |
...ployment/src/main/java/io/quarkus/deployment/builditem/DevServicesLocalNetworkBuildItem.java
Outdated
Show resolved
Hide resolved
Although I didn't look at the details (I'll do that as soon as time permits), I am +1 for the approach. Thanks for your patience on this while I have been unable to focus on the issue properly :) |
...nt/src/main/java/io/quarkus/deployment/builditem/DevServicesExposeOnDockerHostBuildItem.java
Outdated
Show resolved
Hide resolved
...loyment/src/main/java/io/quarkus/deployment/builditem/DevServicesSharedNetworkBuildItem.java
Show resolved
Hide resolved
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.
Thanks!
this.useSharedNetwork = useSharedNetwork; | ||
withNetwork(Network.SHARED); |
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.
Coming back to this after encountering a different problem: Why was this call removed? Do you remember?
It seems wrong to me...
Same thing for the other dev services where the same change was made.
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.
It was made consistent with the other DevServices and enabled here if useSharedNetwork
is enabled.
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.
Apicurio was always on the shared network; even if useSharedNetwork
was false... perhaps it needed to be that way, perhaps it did not.. but there was nothing to suggest either way.. so yes use of useSharedNetwork
was made "consistent" across all DevServices..... like I said yesterday, looking Quarkus is both fun and dangerous!
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.
But that part doesn't call withNetwork
or setNetworkAliases
unless I am mistaken. Am I missing something?
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.
Ah sorry, my bad - I see where the call was moved to.
False alarm :)
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.
Yes, it's a "nice" method call isn't it... took me a while before I stepped into it too!
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.
👍🏼
@manstis do you have any pointer where this gets used? PR doesn't contain any test, also no docs update. |
@rsvoboda Furthermore, tests like |
@rsvoboda The change I made to |
@rsvoboda We also use DevServices RedPanda instance/support from our extension too. Similarly |
Following the discussion on Zulip and JIRA this PR corrects the erroneous attempt to control build time behaviour with properties.