Closed AkihiroSuda closed 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.
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?
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)
The
replace inet.af/tcpproxy => github.com/inetaf/tcpproxy v0.0.0-20221017015627-91f861402626
ingo.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
andreplace
directives only operate on the current (“main”) module.exclude
andreplace
directives in modules other than the main module are ignored when building the main module. Thereplace
andexclude
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.
Alternative: mv vendor/inet.af/tcpproxy/tcpproxy.go
to pkg/tcpproxy/tcpproxy.go
The
inet.af
domain was lost: