Fix Antrea Octant plugin build#4107
Merged
Merged
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>
Contributor
Author
|
@tnqn this should be merged for the v1.8 release (and also backported to v1.7). |
antoninbas
commented
Aug 11, 2022
Comment on lines
-192
to
-195
|
|
||
| // 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 |
Contributor
Author
There was a problem hiding this comment.
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
|
mengdie-song
approved these changes
Aug 15, 2022
Contributor
mengdie-song
left a comment
There was a problem hiding this comment.
Thanks for the change, LGTM.
Member
|
/skip-all |
heanlan
pushed a commit
to heanlan/antrea
that referenced
this pull request
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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