-
Notifications
You must be signed in to change notification settings - Fork 386
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
Fix Antrea Octant plugin build #4107
Fix Antrea Octant plugin build #4107
Conversation
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 this should be merged for the v1.8 release (and also backported to v1.7). |
|
||
// Newer version of github.com/googleapis/gnostic make use of newer gopkg.in/yaml(v3), which conflicts with | ||
// explicit imports of gopkg.in/yaml.v2. | ||
replace github.com/googleapis/gnostic v0.5.5 => github.com/googleapis/gnostic v0.4.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this as it doesn't seem required anymore
Codecov Report
@@ Coverage Diff @@
## main #4107 +/- ##
==========================================
+ Coverage 67.10% 67.42% +0.31%
==========================================
Files 299 299
Lines 45443 45443
==========================================
+ Hits 30494 30638 +144
+ Misses 12564 12409 -155
- Partials 2385 2396 +11
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/skip-all |
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>
The plugin had 2 conflicting indirect Go dependencies:
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