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

Don't PublishAllPorts as we already explicitly do :8008/8448 #772

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Apr 4, 2025

This may break use cases which want extra ports to be exposed. This may fix issues where Complement sporadically decides that there are port conflicts, causing CI flakes.

This may break use cases which want extra ports to be exposed.
This may fix issues where Complement sporadically decides that
there are port conflicts, causing CI flakes.
@kegsay kegsay requested review from a team as code owners April 4, 2025 10:10
@@ -380,8 +380,7 @@ func deployImage(
"complement_hs_name": hsName,
},
}, &container.HostConfig{
CapAdd: []string{"NET_ADMIN"}, // TODO : this should be some sort of option
PublishAllPorts: true,
Copy link
Collaborator

@MadLittleMods MadLittleMods Apr 4, 2025

Choose a reason for hiding this comment

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

This may fix issues where Complement sporadically decides that there are port conflicts, causing CI flakes.

Where are you running into the CI flakes?

I'm curious because previously you said you didn't see them in vanilla Complement runs, #761

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, I don't. I'm referring to reports from others who say they have when using Complement on other projects.

@@ -380,8 +380,7 @@ func deployImage(
"complement_hs_name": hsName,
},
}, &container.HostConfig{
CapAdd: []string{"NET_ADMIN"}, // TODO : this should be some sort of option
PublishAllPorts: true,
Copy link
Collaborator

@MadLittleMods MadLittleMods Apr 4, 2025

Choose a reason for hiding this comment

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

I think this will cause issues for some internal images we use at Element like testing the Secure Border Gateway where we export ports for a few more services and interact with them in the Complement tests.

Internal Element link: https://github.com/element-hq/sbg/blob/3871b51144c4eacf1ea0355da2ac625a0bfadce5/complement/Dockerfile#L83-L88

Any advice for how to work around this if this merges?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm I wonder if we keep PublishAllPorts in the default case and then only if cfg.HSPortBindingIP is not the default do we switch to PortBindings? That means it will publish all exposed ports by default, unless you bind to a specific IP (which afaik is only used by homerunner).

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤷 Kinda seems fragile logic to gate the behavior change behind and would be hard to reason about for someone suddenly triggering this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants