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

antrea-octant-plugin can't be load #4083

Closed
liulangwa opened this issue Aug 5, 2022 · 0 comments · Fixed by #4107
Closed

antrea-octant-plugin can't be load #4083

liulangwa opened this issue Aug 5, 2022 · 0 comments · Fixed by #4107
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.

Comments

@liulangwa
Copy link

Describe the bug
faile to start plugin

To Reproduce

after build
./bin/antrea-octant-plugin
panic: proto: file "extensions/extension.proto" is already registered
previously from: "github.com/googleapis/gnostic/extensions"
currently from: "github.com/google/gnostic/extensions"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1d6b3c0?, 0xc0004001e0?}, {0x1d6b3c0?, 0xc000400220})
/root/go/pkg/mod/google.golang.org/protobuf@v1.27.1/reflect/protoregistry/registry.go:54 +0x1ee
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc00012a948, {0x1d8ac50?, 0xc0002eb340?})
/root/go/pkg/mod/google.golang.org/protobuf@v1.27.1/reflect/protoregistry/registry.go:128 +0x39c
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x173d9bd, 0x24}, {0x29f3080, 0x282, 0x282}, 0x0, 0x4, 0x0, 0x0, {0x1d70ab8, ...}, ...})
/root/go/pkg/mod/google.golang.org/protobuf@v1.27.1/internal/filedesc/build.go:113 +0x1d6
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x173d9bd, 0x24}, {0x29f3080, 0x282, 0x282}, 0x0, 0x4, 0x0, 0x0, {0x0, ...}, ...}, ...})
/root/go/pkg/mod/google.golang.org/protobuf@v1.27.1/internal/filetype/build.go:139 +0x19d
github.com/google/gnostic/extensions.file_extensions_extension_proto_init()
/root/go/pkg/mod/github.com/google/gnostic@v0.5.7-v3refs/extensions/extension.pb.go:456 +0x198
github.com/google/gnostic/extensions.init.0()
/root/go/pkg/mod/github.com/google/gnostic@v0.5.7-v3refs/extensions/extension.pb.go:388 +0x17

Expected

Actual behavior

Versions:

git checkout -b xa v1.7.0

@liulangwa liulangwa added the kind/bug Categorizes issue or PR as related to a bug. label Aug 5, 2022
@antoninbas antoninbas self-assigned this Aug 11, 2022
@antoninbas antoninbas added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Aug 11, 2022
antoninbas added a commit to antoninbas/antrea that referenced this issue Aug 11, 2022
The plugin had 2 conflicting indirect Go dependencies:
- github.com/googleapis/gnostic
- github.com/google/gnostic

Having these 2 dependencies caused the same .proto file to be registered
twice, and caused the antrea-octant-plugin binary to panic on start.

github.com/googleapis/gnostic is the old module name, while
github.com/google/gnostic is the new one.

New K8s versions (e.g., v1.24 which is used by Antrea) depend on
github.com/google/gnostic, while older versions (e.g., v1.21 which is
used by Octant) depend on github.com/googleapis/gnostic. To resolve this
issue (at least temporarily), we ensure that only K8s v1.21 libraries
are used to build the plugin, and we eliminate the
github.com/google/gnostic dependency. This is achieved by adding a few
missing replace directives.

Fixes antrea-io#4083

Signed-off-by: Antonin Bas <abas@vmware.com>
tnqn pushed a commit that referenced this issue Aug 15, 2022
The plugin had 2 conflicting indirect Go dependencies:
- github.com/googleapis/gnostic
- github.com/google/gnostic

Having these 2 dependencies caused the same .proto file to be registered
twice, and caused the antrea-octant-plugin binary to panic on start.

github.com/googleapis/gnostic is the old module name, while
github.com/google/gnostic is the new one.

New K8s versions (e.g., v1.24 which is used by Antrea) depend on
github.com/google/gnostic, while older versions (e.g., v1.21 which is
used by Octant) depend on github.com/googleapis/gnostic. To resolve this
issue (at least temporarily), we ensure that only K8s v1.21 libraries
are used to build the plugin, and we eliminate the
github.com/google/gnostic dependency. This is achieved by adding a few
missing replace directives.

Fixes #4083

Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas added a commit to antoninbas/antrea that referenced this issue Aug 15, 2022
The plugin had 2 conflicting indirect Go dependencies:
- github.com/googleapis/gnostic
- github.com/google/gnostic

Having these 2 dependencies caused the same .proto file to be registered
twice, and caused the antrea-octant-plugin binary to panic on start.

github.com/googleapis/gnostic is the old module name, while
github.com/google/gnostic is the new one.

New K8s versions (e.g., v1.24 which is used by Antrea) depend on
github.com/google/gnostic, while older versions (e.g., v1.21 which is
used by Octant) depend on github.com/googleapis/gnostic. To resolve this
issue (at least temporarily), we ensure that only K8s v1.21 libraries
are used to build the plugin, and we eliminate the
github.com/google/gnostic dependency. This is achieved by adding a few
missing replace directives.

Fixes antrea-io#4083

Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas added a commit that referenced this issue Aug 17, 2022
The plugin had 2 conflicting indirect Go dependencies:
- github.com/googleapis/gnostic
- github.com/google/gnostic

Having these 2 dependencies caused the same .proto file to be registered
twice, and caused the antrea-octant-plugin binary to panic on start.

github.com/googleapis/gnostic is the old module name, while
github.com/google/gnostic is the new one.

New K8s versions (e.g., v1.24 which is used by Antrea) depend on
github.com/google/gnostic, while older versions (e.g., v1.21 which is
used by Octant) depend on github.com/googleapis/gnostic. To resolve this
issue (at least temporarily), we ensure that only K8s v1.21 libraries
are used to build the plugin, and we eliminate the
github.com/google/gnostic dependency. This is achieved by adding a few
missing replace directives.

Fixes #4083

Signed-off-by: Antonin Bas <abas@vmware.com>

Signed-off-by: Antonin Bas <abas@vmware.com>
heanlan pushed a commit to heanlan/antrea that referenced this issue Mar 29, 2023
The plugin had 2 conflicting indirect Go dependencies:
- github.com/googleapis/gnostic
- github.com/google/gnostic

Having these 2 dependencies caused the same .proto file to be registered
twice, and caused the antrea-octant-plugin binary to panic on start.

github.com/googleapis/gnostic is the old module name, while
github.com/google/gnostic is the new one.

New K8s versions (e.g., v1.24 which is used by Antrea) depend on
github.com/google/gnostic, while older versions (e.g., v1.21 which is
used by Octant) depend on github.com/googleapis/gnostic. To resolve this
issue (at least temporarily), we ensure that only K8s v1.21 libraries
are used to build the plugin, and we eliminate the
github.com/google/gnostic dependency. This is achieved by adding a few
missing replace directives.

Fixes antrea-io#4083

Signed-off-by: Antonin Bas <abas@vmware.com>
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. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants