containers / gvisor-tap-vsock

A new network stack based on gVisor
Apache License 2.0
269 stars 50 forks source link

go.mod: inet.af/tcpproxy -> github.com/inetaf/tcpproxy #399

Closed AkihiroSuda closed 2 months ago

AkihiroSuda commented 2 months ago

The inet.af domain was lost:

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AkihiroSuda Once this PR has been reviewed and has the lgtm label, please assign cfergeau for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/containers/gvisor-tap-vsock/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
cfergeau commented 2 months ago

This one is tricky, we did the switch to github.com/inetaf/tcpproxy in commit 600910cae, but this caused a regression in gvproxy/podman, so we reverted it in https://github.com/containers/gvisor-tap-vsock/pull/386 The replace inet.af/tcpproxy => github.com/inetaf/tcpproxy v0.0.0-20221017015627-91f861402626 in go.mod is supposed to paper over this issue, but given you opened this PR, this must not be enough?

AkihiroSuda commented 2 months ago

Thanks, replace is enough for now, but I hope that eventually gvisor-tap-vsock can switch to the latest upstream (or just fork it under non-.af TLD)

jandubois commented 1 month ago

The replace inet.af/tcpproxy => github.com/inetaf/tcpproxy v0.0.0-20221017015627-91f861402626 in go.mod is supposed to paper over this issue, but given you opened this PR, this must not be enough?

@cfergeau The problem with replace is that it only affects the main module; it is not inherited just by using gvisor-tap-vsock and it's go.mod:

exclude and replace directives only operate on the current (“main”) module. exclude and replace directives in modules other than the main module are ignored when building the main module. The replace and exclude statements, therefore, allow the main module complete control over its own build, without also being subject to complete control by dependencies. -- Go Wiki: Go Modules

So every program using gvisor-tap-vsock, even if just indirectly, will have to copy the replace directive into their own go.mod file to have any effect.

AkihiroSuda commented 1 month ago

Alternative: mv vendor/inet.af/tcpproxy/tcpproxy.go to pkg/tcpproxy/tcpproxy.go