Skip to content

Commit 02149b9

Browse files
authored
Upgrade Go version to 1.21 (#1587)
The coming patch #1581 uses Go Generics that is available since Go 1.18. Since .github/workflows/Dockerfile pulls a container with Go 1.17, that patch breaks CI workflow. This patch upgrades Go version in all CI workflows to the latest version 1.21. ## Description <!-- reviewpad:summarize:start --> ### Summary generated by Reviewpad on 21 Dec 23 08:47 UTC This pull request upgrades the Go version in all CI workflows to version 1.21. The current version 1.18 is causing issues with the coming patch that uses Go Generics available since Go 1.18. The upgrade is done in the .circleci/config.yml file for the build, test, and trigger-pocket-core-deployments-branches sections. It is also done in the .github/workflows/Dockerfile file. Additionally, the go.mod and README.md files are updated to reflect the new Go version. The patch includes a total of 13 insertions and 10 deletions across 6 files. <!-- reviewpad:summarize:end -->
1 parent 0479a7f commit 02149b9

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
# TODO: Make builds for all platforms where Pocket Core is expected to run
1111
build:
1212
docker:
13-
- image: cimg/go:1.18
13+
- image: cimg/go:1.21
1414
environment:
1515
GO111MODULE: "on"
1616
resource_class: medium+
@@ -35,7 +35,7 @@ jobs:
3535
# TODO: Expand the testing capabilities
3636
test:
3737
docker:
38-
- image: cimg/go:1.18
38+
- image: cimg/go:1.21
3939
environment:
4040
GO111MODULE: "on"
4141
working_directory: /home/circleci/go/src/github.com/pokt-network/pocket-core
@@ -52,7 +52,7 @@ jobs:
5252
# Job to trigger the Pocket Core deployments CI with a specific branch
5353
trigger-pocket-core-deployments-branches:
5454
docker:
55-
- image: cimg/go:1.18
55+
- image: cimg/go:1.21
5656
environment:
5757
GO111MODULE: "on"
5858
working_directory: /home/circleci/go/src/github.com/pokt-network/pocket-core
@@ -67,11 +67,11 @@ jobs:
6767
# Trigger Pocket Core deployments CI
6868
- run:
6969
name: Trigger Pocket Core Deployment build using branch.
70-
command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_BRANCH} 1.18 staging"
70+
command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_BRANCH} 1.21 staging"
7171
# Job to trigger the Pocket Core deployments CI with a specific tag
7272
trigger-pocket-core-deployments-tags:
7373
docker:
74-
- image: cimg/go:1.18
74+
- image: cimg/go:1.21
7575
environment:
7676
GO111MODULE: "on"
7777
working_directory: /home/circleci/go/src/github.com/pokt-network/pocket-core
@@ -86,7 +86,7 @@ jobs:
8686
# Trigger Pocket Core deployments CI
8787
- run:
8888
name: Trigger Pocket Core Deployment build using tags.
89-
command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_TAG} 1.18 staging"
89+
command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_TAG} 1.21 staging"
9090

9191
# Workflow definitions
9292
workflows:

.github/workflows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Based on a previous implementation to make sure we don't break existing deployments.
22
# https://github.com/pokt-network/pocket-core-deployments/blob/staging/docker/Dockerfile
33

4-
FROM golang:1.17-alpine as build
4+
FROM golang:1.21-alpine as build
55
RUN apk add --no-cache ca-certificates
66
WORKDIR /build
77
ADD . .

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Within your fork you are free to work however you want, but keep in mind that in
3838

3939
#### Setting up the Go Environment
4040

41-
Please follow the [Official Installation Guide](https://go.dev/doc/install) to complete this step. Pocket Core uses `go 1.18` so make sure to install the appropiate version before beginning development.
41+
Please follow the [Official Installation Guide](https://go.dev/doc/install) to complete this step. Pocket Core uses `go 1.21` so make sure to install the appropiate version before beginning development.
4242

4343
#### Installing dependencies
4444

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Official golang implementation of the Pocket Network Protocol.
1111
<div>
1212
<a href="https://godoc.org/github.com/pokt-network/pocket-core"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"/></a>
1313
<a href="https://goreportcard.com/report/github.com/pokt-network/pocket-core"><img src="https://goreportcard.com/badge/github.com/pokt-network/pocket-core"/></a>
14-
<a href="https://golang.org"><img src="https://img.shields.io/badge/golang-v1.18-red.svg"/></a>
14+
<a href="https://golang.org"><img src="https://img.shields.io/badge/golang-v1.21-red.svg"/></a>
1515
<a href="https://github.com/tools/godep" ><img src="https://img.shields.io/badge/godep-dependency-71a3d9.svg"/></a>
1616
</div>
1717

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/pokt-network/pocket-core
22

3-
go 1.18
3+
go 1.21
44

55
replace github.com/tendermint/tendermint => github.com/pokt-network/tendermint v0.32.11-0.20230426215212-59310158d3e9
66

go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQ
3838
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4=
3939
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
4040
github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=
41+
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
4142
github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI=
4243
github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA=
4344
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
@@ -61,6 +62,7 @@ github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13P
6162
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
6263
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
6364
github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts=
65+
github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
6466
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
6567
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
6668
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
@@ -115,6 +117,7 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQD
115117
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
116118
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
117119
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
120+
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
118121
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
119122
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
120123
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=

0 commit comments

Comments
 (0)