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

go mod tidy is broken with go 1.13 #81

Closed
tnqn opened this issue Nov 15, 2019 · 7 comments · Fixed by #90
Closed

go mod tidy is broken with go 1.13 #81

tnqn opened this issue Nov 15, 2019 · 7 comments · Fixed by #90
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@tnqn
Copy link
Member

tnqn commented Nov 15, 2019

Describe the bug
Failed to execute go mod tidy with go 1.13.4

go: finding github.com/vmware/octant v0.9.1
github.com/vmware-tanzu/antrea/cmd/antrea-octant-plugin imports
        github.com/vmware/octant/pkg/navigation tested by
        github.com/vmware/octant/pkg/navigation.test imports
        github.com/vmware/octant/pkg/store/fake: module github.com/vmware/octant@latest found (v0.9.1, replaced by github.com/vmware-tanzu/[email protected]), but does not contain package github.com/vmware/
octant/pkg/store/fake

To Reproduce
Execute go mod tidy

Expected
It should tidy the requirements.

Actual behavior
It failed.

Versions:
Please provide the following information:

  • Antrea version (Docker image tag): 0.0.1
@tnqn tnqn added the bug label Nov 15, 2019
@antoninbas
Copy link
Contributor

Do you know the steps to reproduce this? I tried the following and it worked fine:

abas@ubuntu:~/vmware/antrea$ cd /tmp/
abas@ubuntu:/tmp$ git clone [email protected]:vmware-tanzu-private/antrea.git
Cloning into 'antrea'...
remote: Enumerating objects: 143, done.
remote: Counting objects: 100% (143/143), done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 2693 (delta 82), reused 105 (delta 66), pack-reused 2550
Receiving objects: 100% (2693/2693), 2.09 MiB | 12.34 MiB/s, done.
Resolving deltas: 100% (1439/1439), done.
abas@ubuntu:/tmp$ cd antrea/
abas@ubuntu:/tmp/antrea$ go mod tidy
go: finding github.com/vmware/octant/pkg/plugin/service/fake latest
go: finding github.com/vmware/octant/pkg/store/fake latest
go: finding github.com/vmware/octant/internal/portforward/fake latest
go: finding github.com/vmware/octant/pkg/plugin/fake latest
go: finding github.com/vmware/octant/pkg/plugin/api/fake latest
go: finding github.com/vmware/octant/internal/cluster/fake latest
go: finding github.com/vmware/octant/internal/module/fake latest
go: finding github.com/vmware/octant/pkg/action/fake latest
go: finding github.com/vmware/octant/pkg/plugin/service latest
go: finding github.com/vmware/octant/pkg/plugin latest
go: finding github.com/vmware/octant/pkg/store latest
go: finding github.com/vmware/octant/internal/portforward latest
go: finding github.com/vmware/octant/pkg/plugin/api latest
go: finding github.com/vmware/octant/internal/cluster latest
go: finding github.com/vmware/octant/internal/module latest
go: finding github.com/vmware/octant/pkg/action latest
go: finding github.com/vmware/octant/pkg latest
go: finding github.com/vmware/octant/internal latest
abas@ubuntu:/tmp/antrea$ git diff
abas@ubuntu:/tmp/antrea$

The output is strange (probably because of the "replace" statement) but the command does not fail.

@tnqn
Copy link
Member Author

tnqn commented Nov 15, 2019

The only difference is I checked the repo via https. Did you try it on a new machine? it looks like using cache so might not have this problem

@antoninbas
Copy link
Contributor

Yes that's probably why. I already have all the dependencies in my GOPATH. Let me try in a container.

@antoninbas
Copy link
Contributor

Succeeds inside a fresh container as well. No error after displaying the message "go: finding github.com/vmware/octant v0.9.1". Maybe something else is at play here.

@antoninbas
Copy link
Contributor

I confirmed with @tnqn offline. This is an issue with the Go version (works fine with 1.12 but not with 1.13.4). We need to dig deeper to find out what the root cause is.

To test with Go 1.12:

docker run -w /usr/src/github.com/vmware-tanzu/antrea -v `pwd`:/usr/src/github.com/vmware-tanzu/antrea golang:1.12 go mod tidy

To test with Go 1.13.4:

docker run -w /usr/src/github.com/vmware-tanzu/antrea -v `pwd`:/usr/src/github.com/vmware-tanzu/antrea golang:1.13.4 go mod tidy

@antoninbas antoninbas self-assigned this Nov 15, 2019
@tnqn tnqn changed the title go mod tidy is broken go mod tidy is broken with go 1.13.4 Nov 16, 2019
@antoninbas antoninbas changed the title go mod tidy is broken with go 1.13.4 go mod tidy is broken with go 1.13 Nov 16, 2019
@antoninbas
Copy link
Contributor

I have opened an issue with the Octant project: vmware-archive/octant#427. I believe they should be checking-in the code generated by mockgen.

@antoninbas
Copy link
Contributor

My Octant PR has been merged in. I am back-porting it to the version of octant we are currently supporting (v0.8) in my fork: https://github.com/antoninbas/octant/tree/release-0.8-antrea

antoninbas added a commit that referenced this issue Nov 16, 2019
"go mod" was unstable with go 1.12 and broken with go 1.13 because of
some missing test source files in the Octant repository. "go mod tidy"
records test dependencies which means that even generated source files
(e.g. mocks) which are only used for testing have to be checked-in.

This has been patched in the Octant master branch but because we are
using an older version of Octant (v0.8), we are using an Octant fork at
the moment, which includes a back-port of the change to v0.8.

Fixes #81
antoninbas added a commit that referenced this issue Nov 17, 2019
"go mod" was unstable with go 1.12 and broken with go 1.13 because of
some missing test source files in the Octant repository. "go mod tidy"
records test dependencies which means that even generated source files
(e.g. mocks) which are only used for testing have to be checked-in.

This has been patched in the Octant master branch but because we are
using an older version of Octant (v0.8), we are using an Octant fork at
the moment, which includes a back-port of the change to v0.8.

Fixes #81
@McCodeman McCodeman added the kind/bug Categorizes issue or PR as related to a bug. label Jan 29, 2020
zyiou added a commit to zyiou/antrea that referenced this issue Jul 2, 2021
hongliangl referenced this issue in hongliangl/antrea Sep 28, 2021
Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
hongliangl referenced this issue in hongliangl/antrea Sep 28, 2021
Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
hongliangl referenced this issue in hongliangl/antrea Sep 29, 2021
Since a SNAT ct zone is added in PR antrea-io#2599, hairpin Service
traffic can make use of the SNAT ct zone instead of current
stateless SNAT by modifying source and destination IPs.
By removing hairpin table ServiceHairpinTable and
HairpinSNATTable, the OVS pipeline can be simpler.

Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
hongliangl referenced this issue in hongliangl/antrea Sep 29, 2021
Since a SNAT ct zone is added in PR antrea-io#2599, hairpin Service
traffic can make use of the SNAT ct zone instead of current
stateless SNAT by modifying source and destination IPs.
By removing hairpin table ServiceHairpinTable and
HairpinSNATTable, the OVS pipeline can be simpler.

Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
hongliangl referenced this issue in hongliangl/antrea Sep 29, 2021
Since a SNAT ct zone is added in PR antrea-io#2599, hairpin Service
traffic can make use of the SNAT ct zone instead of current
stateless SNAT by modifying source and destination IPs.
By removing hairpin table ServiceHairpinTable and
HairpinSNATTable, the OVS pipeline can be simpler.

Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
hongliangl referenced this issue in hongliangl/antrea Sep 29, 2021
Since a SNAT ct zone is added in PR antrea-io#2599, hairpin Service
traffic can make use of the SNAT ct zone instead of current
stateless SNAT by modifying source and destination IPs.
By removing hairpin table ServiceHairpinTable and
HairpinSNATTable, the OVS pipeline can be simpler.

Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
hongliangl referenced this issue in hongliangl/antrea Sep 29, 2021
Since a SNAT ct zone is added in PR antrea-io#2599, hairpin Service
traffic can make use of the SNAT ct zone instead of current
stateless SNAT by modifying source and destination IPs.
By removing hairpin table ServiceHairpinTable and
HairpinSNATTable, the OVS pipeline can be simpler.

Pipeline modifications:
- Remove table serviceHairpinTable #23.
- Remove table HairpinSNATTable #108.
- Add table hairpinMarkTable #81 after table
  l2ForwardingCalcTable #80.

When a local Endpoint is referenced by a Service, then a
flow that matches the packet whose input and output
interfaces are the same and makes mark HairpinRegMark,
will be installed on table hairpinMarkTable. Packets with
mark HairpinRegMark will be performed SNAT with Antrea
gateway IP on table snatConntrackCommitTable.

Signed-off-by: Hongliang Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants