-
Notifications
You must be signed in to change notification settings - Fork 368
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
Rename Go module from github.com/vmware-tanzu/antrea to antrea.io/antrea #2166
Rename Go module from github.com/vmware-tanzu/antrea to antrea.io/antrea #2166
Conversation
BTW, I have already configured the antrea.io website to serve the HTML data required for the vanity import path to work. |
Codecov Report
@@ Coverage Diff @@
## main #2166 +/- ##
==========================================
+ Coverage 61.07% 65.28% +4.21%
==========================================
Files 270 270
Lines 20486 20486
==========================================
+ Hits 12512 13375 +863
+ Misses 6672 5745 -927
- Partials 1302 1366 +64
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This is a pretty straightforward change with one exception: we cannot use the default Protobuf package names for Antrea APIs because of name resolution in protoc and because of how go-to-protobuf references messages defined in other .proto files. go-to-protobuf will not add a leading dot to the message path, and in that case protoc does resolution starting from the inbermost scope. Default package names start with "antrea.io.antrea." which means that for any message reference that matches "antrea.io.antrea.<path>", protoc will look for "antrea.io.antrea.io.antrea.<path>" which obviously will fail. To avoid a "sed" hack to add a leading dot (which would require us to run protoc directly), we rename the package names to "antrea_io.antrea.*". Even though this causes some extra code to be re-generated, there shouldn't be any impact at all on backwards-compatibility: the Protobuf messages themselves do not change. Consumers of the Antrea Go module should update the import path they use for Antrea. If these consumers are "pinning" a version of Antrea which is on a release branch that was created before the repository transfer (for now, all release branches...), their code should keep working. See antrea-io#2154
1d6a315
to
628aa96
Compare
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
/test-all |
1 similar comment
/test-all |
This is a pretty straightforward change with one exception: we cannot
use the default Protobuf package names for Antrea APIs because of name
resolution in protoc and because of how go-to-protobuf references
messages defined in other .proto files. go-to-protobuf will not add a
leading dot to the message path, and in that case protoc does resolution
starting from the inbermost scope. Default package names start with
"antrea.io.antrea." which means that for any message reference that
matches "antrea.io.antrea.", protoc will look for
"antrea.io.antrea.io.antrea." which obviously will fail. To avoid
a "sed" hack to add a leading dot (which would require us to run protoc
directly), we rename the package names to "antrea_io.antrea.*". Even
though this causes some extra code to be re-generated, there shouldn't
be any impact at all on backwards-compatibility: the Protobuf messages
themselves do not change.
Consumers of the Antrea Go module should update the import path they use
for Antrea. If these consumers are "pinning" a version of Antrea which
is on a release branch that was created before the repository transfer
(for now, all release branches...), their code should keep working.
See #2154