Skip to content

Commit c12452b

Browse files
committed
misc: Move to golang 1.21
Unfortunately, this also breaks go-mod-upgrade with: upgrade failed error=Error running go command to discover modules: exit status 1 stderr=go: loading module retractions for golang.org/x/[email protected]: version "v0.17.0" invalid: resolves to version v0.17.1-0.20240315155916-aa51b25a4485 (v0.17.0 is not a tag) go: loading module retractions for golang.org/x/[email protected]: version "v0.7.0" invalid: resolves to version v0.7.1-0.20240304172602-14be23e5b48b (v0.7.0 is not a tag)
1 parent 0e92d19 commit c12452b

File tree

10 files changed

+58
-55
lines changed

10 files changed

+58
-55
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
# macos tests are currently failing in CI
2828
#- macos-latest
2929
golang_version:
30-
# TODO: add 1.21.x and tip
30+
# TODO: add 1.22.x and tip
3131
# minimum required and latest published go_version
32-
- "1.20"
32+
- "1.21"
3333
test_block:
3434
- basic
3535
- shell

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ install: 'make deps'
2424
matrix:
2525
fast_finish: false
2626
allow_failures:
27-
- go: 1.21.x
27+
- go: 1.22.x
2828
- go: tip
2929
- os: osx
3030
# include only one build for osx for a quicker build as the nr. of these runners are sparse
3131
include:
3232
- name: "basic tests"
33-
go: 1.20.x
33+
go: 1.21.x
3434
env: TEST_BLOCK=basic
3535
- name: "shell tests"
36-
go: 1.20.x
36+
go: 1.21.x
3737
env: TEST_BLOCK=shell
3838
- name: "race tests"
39-
go: 1.20.x
39+
go: 1.21.x
4040
env: TEST_BLOCK=race
41-
- go: 1.21.x
41+
- go: 1.22.x
4242
- go: tip
4343
- os: osx
4444
script: 'TEST_BLOCK="$TEST_BLOCK" make test'

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20
1+
FROM golang:1.21
22

33
MAINTAINER Michał Czeraszkiewicz <[email protected]>
44

docker/Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV PATH=/opt/rh/rh-ruby22/root/usr/bin:/root/gopath/bin:/usr/local/sbin:/sbin:/
66
ENV LD_LIBRARY_PATH=/opt/rh/rh-ruby22/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
77
ENV PKG_CONFIG_PATH=/opt/rh/rh-ruby22/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
88

9-
RUN yum -y install epel-release wget unzip git make which centos-release-scl gcc && sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/epel-testing.repo && yum -y install rh-ruby22 && wget -O /opt/go1.20.11.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.20.11.linux-amd64.tar.gz && tar -C /usr/local -xzf /opt/go1.20.11.linux-amd64.tar.gz
9+
RUN yum -y install epel-release wget unzip git make which centos-release-scl gcc && sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/epel-testing.repo && yum -y install rh-ruby22 && wget -O /opt/go1.21.9.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.21.9.linux-amd64.tar.gz && tar -C /usr/local -xzf /opt/go1.21.9.linux-amd64.tar.gz
1010
RUN mkdir -p $GOPATH/src/github.com/purpleidea && cd $GOPATH/src/github.com/purpleidea && git clone --recursive https://github.com/purpleidea/mgmt
1111
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 && cd $GOPATH/src/github.com/purpleidea/mgmt && make deps && make build
1212
CMD ["/bin/bash"]

docker/Dockerfile.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20
1+
FROM golang:1.21
22

33
MAINTAINER Michał Czeraszkiewicz <[email protected]>
44

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ required for running the _test_ suite.
2828

2929
### Build
3030

31-
* `golang` 1.20 or higher (required, available in some distros and distributed
31+
* `golang` 1.21 or higher (required, available in some distros and distributed
3232
as a binary officially by [golang.org](https://golang.org/dl/))
3333

3434
### Runtime

docs/quick-start-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You'll need some dependencies, including `golang`, and some associated tools.
3737

3838
#### Installing golang
3939

40-
* You need golang version 1.20 or greater installed.
40+
* You need golang version 1.21 or greater installed.
4141
* To install on rpm style systems: `sudo dnf install golang`
4242
* To install on apt style systems: `sudo apt install golang`
4343
* To install on macOS systems install [Homebrew](https://brew.sh)

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/purpleidea/mgmt
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/alexflint/go-arg v1.4.3
@@ -13,6 +13,7 @@ require (
1313
github.com/docker/docker v25.0.4+incompatible
1414
github.com/docker/go-connections v0.5.0
1515
github.com/fsnotify/fsnotify v1.7.0
16+
github.com/go-git/go-git/v5 v5.11.0
1617
github.com/godbus/dbus/v5 v5.1.0
1718
github.com/google/nftables v0.2.0
1819
github.com/google/uuid v1.6.0
@@ -37,6 +38,7 @@ require (
3738
go.etcd.io/etcd/client/pkg/v3 v3.5.12
3839
go.etcd.io/etcd/client/v3 v3.5.12
3940
go.etcd.io/etcd/server/v3 v3.5.12
41+
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
4042
golang.org/x/crypto v0.21.0
4143
golang.org/x/sys v0.18.0
4244
golang.org/x/time v0.5.0
@@ -68,7 +70,6 @@ require (
6870
github.com/felixge/httpsnoop v1.0.4 // indirect
6971
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
7072
github.com/go-git/go-billy/v5 v5.5.0 // indirect
71-
github.com/go-git/go-git/v5 v5.11.0 // indirect
7273
github.com/go-logr/logr v1.4.1 // indirect
7374
github.com/go-logr/stdr v1.2.2 // indirect
7475
github.com/gogo/protobuf v1.3.2 // indirect
@@ -111,6 +112,7 @@ require (
111112
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
112113
github.com/modern-go/reflect2 v1.0.2 // indirect
113114
github.com/morikuni/aec v1.0.0 // indirect
115+
github.com/nxadm/tail v1.4.11 // indirect
114116
github.com/opencontainers/go-digest v1.0.0 // indirect
115117
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
116118
github.com/pierrec/lz4/v4 v4.1.21 // indirect
@@ -147,7 +149,6 @@ require (
147149
go.uber.org/atomic v1.11.0 // indirect
148150
go.uber.org/multierr v1.11.0 // indirect
149151
go.uber.org/zap v1.23.0 // indirect
150-
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
151152
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
152153
golang.org/x/mod v0.16.0 // indirect
153154
golang.org/x/net v0.22.0 // indirect

0 commit comments

Comments
 (0)