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

[Merged by Bors] - Update to go 1.20 #4864

Closed
wants to merge 7 commits into from
Closed

[Merged by Bors] - Update to go 1.20 #4864

wants to merge 7 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Aug 16, 2023

Motivation

Go 1.19 is now EOL and won't be updated any more. This PR updates our codebase to 1.20.

Changes

  • update all uses of go to 1.20: go.mod, Dockerfiles, documentation
  • instead of top-level deprecated math/rand functions use crypto/rand or an instance of *rand.Rand instead
  • use errors.Join instead of github.com/hashicorp/go-multierror
  • fix staticcheck and lint complaints

Test Plan

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed

DevOps Notes

  • This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
  • This PR does not affect public APIs
  • This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
  • This PR does not make changes to log messages (which monitoring infrastructure may rely on)

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #4864 (62e43bd) into develop (00b8792) will increase coverage by 0.1%.
Report is 1 commits behind head on develop.
The diff coverage is 46.6%.

@@            Coverage Diff            @@
##           develop   #4864     +/-   ##
=========================================
+ Coverage     76.8%   77.0%   +0.1%     
=========================================
  Files          261     260      -1     
  Lines        29720   29626     -94     
=========================================
- Hits         22852   22831     -21     
+ Misses        5416    5344     -72     
+ Partials      1452    1451      -1     
Files Changed Coverage Δ
activation/handler.go 76.6% <0.0%> (ø)
api/grpcserver/events.go 68.0% <0.0%> (-8.0%) ⬇️
checkpoint/runner.go 77.8% <0.0%> (ø)
common/types/testutil.go 72.7% <ø> (ø)
datastore/store.go 69.9% <0.0%> (ø)
genvm/core/context.go 76.5% <0.0%> (ø)
genvm/rewards.go 80.0% <0.0%> (ø)
genvm/templates/vault/handler.go 66.6% <0.0%> (ø)
hare/hare.go 75.2% <0.0%> (ø)
activation/nipost.go 84.1% <33.3%> (ø)
... and 9 more

... and 3 files with indirect coverage changes

@fasmat fasmat marked this pull request as ready for review August 16, 2023 18:19
@fasmat fasmat changed the title WiP: Update to go 1.20 Update to go 1.20 Aug 16, 2023
@fasmat
Copy link
Member Author

fasmat commented Aug 16, 2023

bors try

bors bot added a commit that referenced this pull request Aug 16, 2023
@bors
Copy link

bors bot commented Aug 16, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@fasmat
Copy link
Member Author

fasmat commented Aug 16, 2023

I would like to also upgrade to 1.21 after this is merged, but will do it in 2 steps to keep the changes easier to review and test.

rand/rand.go Show resolved Hide resolved
@fasmat
Copy link
Member Author

fasmat commented Aug 17, 2023

bors merge

bors bot pushed a commit that referenced this pull request Aug 17, 2023
## Motivation
Go 1.19 is now EOL and won't be updated any more. This PR updates our codebase to 1.20.

## Changes
- update all uses of go to 1.20: `go.mod`, `Dockerfile`s, documentation
- instead of top-level deprecated `math/rand` functions use `crypto/rand` or an instance of `*rand.Rand` instead
- use `errors.Join` instead of `github.com/hashicorp/go-multierror`
- fix `staticcheck` and `lint` complaints

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed

## DevOps Notes
<!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases -->
- [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
- [x] This PR does not affect public APIs
- [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
- [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
@fasmat fasmat self-assigned this Aug 17, 2023
@bors
Copy link

bors bot commented Aug 17, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title Update to go 1.20 [Merged by Bors] - Update to go 1.20 Aug 17, 2023
@bors bors bot closed this Aug 17, 2023
@bors bors bot deleted the update-go-1.20 branch August 17, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants