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

support both square brackets and raw syntax for IPV6 #78

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Mar 3, 2021

as discovered on docker-archive/compose-cli#1386:

docker-compose (docker-py) uses raw IPv6 for port specification, which go-connections reject as it relies on net.SplitHostPort which require square bracets.

This PR relax requirement for square bracket, while still supporting those. I'll prepare another PR on docker-py to accepts and ignore square brackets, so both can be interoperable.

this is required to let IPV6 users (our own @chris-crone might not be the sole one) switch between docker-compose to dockercompose

@ndeloof ndeloof marked this pull request as ready for review March 3, 2021 15:09
Copy link

@gtardif gtardif left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Member

Argh.. #77 still isn't merged yet I see, so tests don't actually run 🙄

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@thaJeztah
Copy link
Member

Thanks! all tests now ran, and passed

=== RUN   TestPartPortSpecIPV6
=== RUN   TestPartPortSpecIPV6/square_angled_IPV6_without_host_port
=== RUN   TestPartPortSpecIPV6/square_angled_IPV6_with_host_port
=== RUN   TestPartPortSpecIPV6/IPV6_without_host_port
=== RUN   TestPartPortSpecIPV6/IPV6_with_host_port
=== RUN   TestPartPortSpecIPV6/::_IPV6,_without_host_port
--- PASS: TestPartPortSpecIPV6 (0.00s)
    --- PASS: TestPartPortSpecIPV6/square_angled_IPV6_without_host_port (0.00s)
    --- PASS: TestPartPortSpecIPV6/square_angled_IPV6_with_host_port (0.00s)
    --- PASS: TestPartPortSpecIPV6/IPV6_without_host_port (0.00s)
    --- PASS: TestPartPortSpecIPV6/IPV6_with_host_port (0.00s)
    --- PASS: TestPartPortSpecIPV6/::_IPV6,_without_host_port (0.00s)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 851a7fc into docker:master Mar 15, 2021
@ndeloof ndeloof deleted the square_angles branch January 19, 2022 08:21
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.

None yet

4 participants