Skip to content

Commit

Permalink
Use go 1.21 (#767)
Browse files Browse the repository at this point in the history
* use go 1.21

* upgrade lichen

* upgrade lichen

* try to fix windows test issues by upgrading zap and its clock dep

* go mod tidy -go=1.21.5 -compat=1.17.0

* remove minor version

* upgrade k8s dependencies

* remove cluster name from k8s operators, cluster name is not detectable from the k8s api

* disable windows test runner

* finish cluster name removal

* upgrade test containers

* Revert "disable windows test runner". We need this because there are
tests that specifically run on windows

This reverts commit a9ac344.

* run windows tests without cgo

* race flag requires cgo

* use 'env' option to disable cgo
  • Loading branch information
Joseph Sirianni authored Dec 18, 2023
1 parent c034064 commit aafd84f
Show file tree
Hide file tree
Showing 10 changed files with 262 additions and 1,890 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: "1.21"

- name: Install License Scanner
run: go install github.com/uw-labs/[email protected].4
run: go install github.com/uw-labs/[email protected].7

- name: Check out source code
uses: actions/checkout@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/multi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
go-version: "1.21"
check-latest: true
- name: Cache Go Modules
uses: actions/cache@v2
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
go-version: "1.21"
check-latest: true
- name: Cache Go Modules
uses: actions/cache@v2
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
go-version: "1.21"
check-latest: true
- name: Cache Go Modules
uses: actions/cache@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
go-version: "1.21"
check-latest: true
- name: Cache Go Modules
uses: actions/cache@v2
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: "1.21"
check-latest: true
- name: "Get Tag From Environment"
id: get-tag
Expand All @@ -119,7 +119,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: "1.21"
check-latest: true
- name: Set up Docker Buildx
id: buildx
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
go-version: "1.21"
check-latest: true

# Load caches based on OS
Expand Down Expand Up @@ -50,8 +50,18 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
# Run darwin and linux tests
- name: Run Tests
if: matrix.os != 'windows-2019'
run: go test -race -coverprofile coverage.txt -coverpkg ./... ./...

# Run windows tests without cgo, race flag (requires cgo), or coverage
- name: Run Windows Tests
if: matrix.os == 'windows-2019'
run: go test ./...
env:
CGO_ENABLED: 0

- name: Upload Codecov
# Only submit code coverage if OS is Linux
if: matrix.os == 'ubuntu-20.04'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ FIELDALIGNMENT_DIRS := ./...
.PHONY: install-tools
install-tools:
go install github.com/vektra/mockery/cmd/[email protected]
go install github.com/uw-labs/[email protected].5
go install github.com/uw-labs/[email protected].7
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
go install github.com/observiq/amazon-log-agent-benchmark-tool/cmd/logbench@ecfeca6c7554
go install github.com/goreleaser/[email protected]
Expand Down
116 changes: 69 additions & 47 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/observiq/stanza

go 1.17
go 1.21

require (
cloud.google.com/go/logging v1.7.0
Expand All @@ -9,7 +9,7 @@ require (
github.com/aws/aws-sdk-go v1.44.4
github.com/bmatcuk/doublestar/v2 v2.0.4
github.com/bmatcuk/doublestar/v3 v3.0.0
github.com/cenkalti/backoff/v4 v4.1.3
github.com/cenkalti/backoff/v4 v4.2.1
github.com/elastic/go-elasticsearch/v7 v7.13.0
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.0
Expand All @@ -24,39 +24,40 @@ require (
github.com/observiq/goflow/v3 v3.4.4
github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.8.1
github.com/testcontainers/testcontainers-go v0.13.0
go.etcd.io/bbolt v1.3.6
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.21.0
golang.org/x/oauth2 v0.7.0
golang.org/x/sync v0.1.0
github.com/stretchr/testify v1.8.4
github.com/testcontainers/testcontainers-go v0.26.0
go.etcd.io/bbolt v1.3.7
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.26.0
golang.org/x/oauth2 v0.10.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.15.0
golang.org/x/text v0.13.0
gonum.org/v1/gonum v0.11.0
google.golang.org/api v0.114.0
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
google.golang.org/grpc v1.56.3
google.golang.org/api v0.126.0
google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc
google.golang.org/grpc v1.57.1
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 v2.4.0
// k8s.io modules should be the same version
k8s.io/api v0.23.6
k8s.io/apimachinery v0.23.6
k8s.io/client-go v0.23.5
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
)

require (
github.com/google/uuid v1.3.0
github.com/googleapis/gax-go/v2 v2.7.1
github.com/google/uuid v1.3.1
github.com/googleapis/gax-go/v2 v2.11.0
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc
gopkg.in/natefinch/lumberjack.v2 v2.0.0
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go v0.110.2 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/longrunning v0.4.1 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/azure-amqp-common-go/v3 v3.2.3 // indirect
github.com/Azure/azure-sdk-for-go v51.1.0+incompatible // indirect
github.com/Azure/go-amqp v0.17.0 // indirect
Expand All @@ -69,64 +70,85 @@ require (
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/benbjohnson/clock v1.1.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/containerd v1.5.9 // indirect
github.com/containerd/containerd v1.7.7 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/devigned/tab v0.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/libp2p/go-reuseport v0.0.1 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.7.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.14.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/shirou/gopsutil/v3 v3.23.9 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.12.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit aafd84f

Please sign in to comment.