forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go 1.17 has just been released, which means that Go 1.15 will not be actively maintained any more. One notable change in Go 1.17 is that "pruned module graphs" are used: https://golang.org/doc/go1.17#go-command. In Go 1.17, for the go command to correctly resolve transitive imports using the pruned module graph, the go.mod file for each module needs to include more detail about the transitive dependencies relevant to that module. This leads to a second require directive for modules that provide a transitively-imported package. In previous versions, the go.mod file typically only included explicit requirements for directly-imported packages. The following command was used to update the go.mod (as suggested): go-1.17 mod tidy -go=1.16 && go-1.17 mod tidy -go=1.17 I checked that the project could still be built using older Go versions: GO=go-1.15 make bin GO=go-1.16 make bin GO=go-1.17 make bin Another notable change is in the implementation of ParseIP and ParseCIDR from the net package. These functions now reject IPv4 addresses which contain decimal components with leading zeros. K8s is taking some extra steps as they upgrade to Go 1.17 to ensure backwards-compatibility of API resources which include IP fields and for which the contents of the field are validated using the net stdlib functions. They are defining their own versions of these functions, using code from the old version of the standard library. In our case, we have decided not to follow in K8s steps and we are sticking to the Go 1.17 standard library. Our analysis has concluded that there is no reason to preserve past behavior for network policies which use such IPv4 addresses. Note that these policies will still be "valid" resources that users can delete / update. But the Agent will reject the internal version of the policies distributed by the Controller. As part of this change, I also tried to have the current Go version be defined in a "central" location to facilitate future updates. Unfortunately this doesn't apply to Github actions yet, for which the Go version is still hardcoded in multiple places. Fixes antrea-io#2606 Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information
1 parent
9e112d4
commit 7f448b0
Showing
33 changed files
with
301 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
bin/antctl-darwin | ||
bin/antctl-linux | ||
bin/antctl-windows.exe | ||
test/e2e/infra |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM golang:1.15 as antrea-build | ||
ARG GO_VERSION | ||
FROM golang:${GO_VERSION} as antrea-build | ||
|
||
COPY . /antrea | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM golang:1.15 as antrea-build | ||
ARG GO_VERSION | ||
FROM golang:${GO_VERSION} as antrea-build | ||
|
||
WORKDIR /antrea | ||
|
||
|
Oops, something went wrong.