You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.withReuse(true) is broken out of the box because of randomly assigned network alias #2801
A random network alias is assigned during field initialization time, this ALWAYS prevents the computed hash from matching, unless one calls container.getNetworkAliases().clear() before adding their own network alias with .withNetworkAliases("some static value").
I propose that the default behaviour to allocate a random network alias be changed to happen lazily and when no other explictly specified network alias is set.
And also perhaps print a warning/error when no explict network alias is defined and .withReuse(true) is used.
@aaronjwhiteside yes, Reusable Containers are not compatible with networks as stated in the PR: #1781
Also, I would not call it "broken", but rather "not supported" (yet). We have some ideas how to support Networks (even if you fix the aliasing, the Network id is still random), but it requires a bit of time.
Activity
bsideup commentedon May 28, 2020
@aaronjwhiteside yes, Reusable Containers are not compatible with networks as stated in the PR:
#1781
Also, I would not call it "broken", but rather "not supported" (yet). We have some ideas how to support Networks (even if you fix the aliasing, the Network id is still random), but it requires a bit of time.
aaronjwhiteside commentedon May 28, 2020
@bsideup I have it working by clearing the assigned network aliases and using a custom implementation of Network.
I'd be interested to hear what ideas you have, even if I may better use them in our setup. I'd be happy to contribute too.
On the flip side I kinda feel that if it's "not supported" yet that things should fail-fast and hard with informative error messages.
bharath-tw commentedon Aug 12, 2022
A simpler way would be to directly set the networkAliases via
setNetworkAliases(List.of("kafka"))