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

Update Go to v1.19 #4106

Merged
merged 2 commits into from
Aug 24, 2022
Merged

Conversation

antoninbas
Copy link
Contributor

@antoninbas antoninbas commented Aug 11, 2022

Most notables changes:

  • we remove all uses of the io/ioutil package, which has been deprecated
  • gofmt now reformats doc comments (e.g., lists inside comment blocks),
    which is why some comments have been reformatted automatically
  • the codegen image has been updated to kubernetes-1.24.0-build.1 to
    include the updated version of Go. "go get: no longer builds or
    installs packages in module-aware mode, so "go get" has been replaced
    with "go install" in the Dockerfile.
  • we now use the version of Go from the root go.mod file when setting up
    Go in Github workflows. This will reduce the number of changes we have
    to do in the future when updating Go.
  • running "go mod tidy" with the updated Go version seems to have
    removed some stale entries from go.sum files.
  • we need to disable cgo whenever building the Octant plugin on
    Linux. Not quite sure how this is related to the Go version update:
    maybe some small change in "go build" to determine when to enable /
    disable cgo.

Fixes #4105

Signed-off-by: Antonin Bas [email protected]

@antoninbas antoninbas marked this pull request as ready for review August 11, 2022 19:11
@antoninbas antoninbas added this to the Antrea v1.9 release milestone Aug 11, 2022
@antoninbas antoninbas added area/build-release Issues or PRs related to building and releasing kind/task Categorizes issue or PR as related to a routine task that needs to be performed action/release-note Indicates a PR that should be included in release notes. labels Aug 11, 2022
@codecov
Copy link

codecov bot commented Aug 11, 2022

Codecov Report

Merging #4106 (ad03e66) into main (249678f) will increase coverage by 0.30%.
The diff coverage is 80.95%.

❗ Current head ad03e66 differs from pull request most recent head fff6009. Consider uploading reports for the commit fff6009 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4106      +/-   ##
==========================================
+ Coverage   66.20%   66.51%   +0.30%     
==========================================
  Files         306      304       -2     
  Lines       46663    47248     +585     
==========================================
+ Hits        30894    31426     +532     
- Misses      13366    13381      +15     
- Partials     2403     2441      +38     
Flag Coverage Δ *Carryforward flag
e2e-tests 38.44% <50.00%> (?)
integration-tests 34.89% <87.50%> (-0.25%) ⬇️ Carriedforward from 3d5c617
kind-e2e-tests 49.26% <55.00%> (+0.14%) ⬆️ Carriedforward from 3d5c617
unit-tests 44.97% <42.85%> (-0.02%) ⬇️ Carriedforward from 3d5c617

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...icluster/cmd/multicluster-controller/controller.go 7.77% <ø> (ø)
multicluster/cmd/multicluster-controller/leader.go 0.00% <ø> (ø)
multicluster/cmd/multicluster-controller/member.go 0.00% <ø> (ø)
...llers/multicluster/leader_clusterset_controller.go 56.03% <ø> (ø)
pkg/agent/agent.go 57.59% <ø> (+7.25%) ⬆️
pkg/agent/apiserver/apiserver.go 74.50% <0.00%> (+7.48%) ⬆️
pkg/agent/cniserver/server.go 77.35% <ø> (ø)
pkg/agent/controller/networkpolicy/cache.go 87.03% <ø> (+0.29%) ⬆️
...ntroller/networkpolicy/networkpolicy_controller.go 78.36% <ø> (+4.42%) ⬆️
pkg/agent/controller/networkpolicy/reconciler.go 76.18% <ø> (+4.88%) ⬆️
... and 80 more

@antoninbas antoninbas force-pushed the update-golang-to-v1.19 branch 3 times, most recently from 1aeea9c to 1927878 Compare August 11, 2022 22:12
@antoninbas
Copy link
Contributor Author

Depends on #4109

@antoninbas antoninbas force-pushed the update-golang-to-v1.19 branch 2 times, most recently from b992d75 to 44ac663 Compare August 23, 2022 01:40
Most notables changes:
* we remove all uses of the io/ioutil package, which has been deprecated
* gofmt now reformats doc comments (e.g., lists inside comment blocks),
  which is why some comments have been reformatted automatically
* the codegen image has been updated to kubernetes-1.24.0-build.1 to
  include the updated version of Go. "go get: no longer builds or
  installs packages in module-aware mode, so "go get" has been replaced
  with "go install" in the Dockerfile.
* we now use the version of Go from the root go.mod file when setting up
  Go in Github workflows. This will reduce the number of changes we have
  to do in the future when updating Go.
* running "go mod tidy" with the updated Go version seems to have
  removed some stale entries from go.sum files.
* we need to disable cgo whenever building the Octant plugin on
  Linux. Not quite sure how this is related to the Go version update:
  maybe some small change in "go build" to determine when to enable /
  disable cgo.

Fixes antrea-io#4105

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas
Copy link
Contributor Author

/test-all

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question

@@ -274,7 +274,8 @@ func executeTests(k8s *Kubernetes, testList []*TestCase) []*TestCase {
return modifiedTestList
}

/**
/*
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, does the second "*" mean anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't mean anything. gofmt now does some comment reformatting, and this file was updated automatically. I am ignoring this change since this whole folder (hack/netpol) should be removed pretty soon.

@antoninbas
Copy link
Contributor Author

/test-e2e

@@ -1 +1 @@
1.17
1.19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR, but I am thinking we may use the same version from go.mod instead of this file in the future?

@XinShuYang
Copy link
Contributor

/test-all

@antoninbas
Copy link
Contributor Author

/test-e2e

@antoninbas antoninbas merged commit 25ff93d into antrea-io:main Aug 24, 2022
@antoninbas antoninbas deleted the update-golang-to-v1.19 branch August 24, 2022 22:36
heanlan pushed a commit to heanlan/antrea that referenced this pull request Mar 29, 2023
* Update Go to v1.19

Most notables changes:
* we remove all uses of the io/ioutil package, which has been deprecated
* gofmt now reformats doc comments (e.g., lists inside comment blocks),
  which is why some comments have been reformatted automatically
* the codegen image has been updated to kubernetes-1.24.0-build.1 to
  include the updated version of Go. "go get: no longer builds or
  installs packages in module-aware mode, so "go get" has been replaced
  with "go install" in the Dockerfile.
* we now use the version of Go from the root go.mod file when setting up
  Go in Github workflows. This will reduce the number of changes we have
  to do in the future when updating Go.
* running "go mod tidy" with the updated Go version seems to have
  removed some stale entries from go.sum files.
* we need to disable cgo whenever building the Octant plugin on
  Linux. Not quite sure how this is related to the Go version update:
  maybe some small change in "go build" to determine when to enable /
  disable cgo.

Fixes antrea-io#4105

Signed-off-by: Antonin Bas <[email protected]>

* Fix docker_update_base_windows.yml

Signed-off-by: Antonin Bas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. area/build-release Issues or PRs related to building and releasing kind/task Categorizes issue or PR as related to a routine task that needs to be performed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Golang from v1.17 to v1.19
4 participants