Skip to content

Commit

Permalink
Update to Go 1.22 and update deps (#78)
Browse files Browse the repository at this point in the history
Update to Go 1.22.

Update dependencies.

Bind to 127.0.0.1 when testing.

Add dependabot.yml config to keep GH actions updated.

Remove usage of GO111MODULE=off.

Update to https://github.com/updatecli/updatecli-action/releases/tag/v2.56.0.
  • Loading branch information
andrewkroh authored Mar 20, 2024
1 parent 8c939ec commit 8f45708
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 129 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
open-pull-requests-limit: 2
4 changes: 2 additions & 2 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Git
uses: elastic/apm-pipeline-library/.github/actions/setup-git@current

- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@453502948b442d7b9a923de7b40cc7ce8628505c
uses: updatecli/updatecli-action@9b35aa663a924d5d5faf89dac76594e3034bcf1f # v2.56.0

- name: Run Updatecli
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install libpcap-dev
run: sudo apt-get update && sudo apt-get install -y libpcap-dev
Expand All @@ -19,14 +19,14 @@ jobs:
id: goversion
run: echo "::set-output name=version::$(cat .go-version)"

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "${{ steps.goversion.outputs.version }}"

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.49
version: v1.56
args: --timeout=5m

# Ignore pre-existing issues.
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.8
1.22.1
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Update build to use Go 1.22. [#78](https://github.com/elastic/stream/pull/78)

### Fixed

### Removed
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.8 as builder
FROM golang:1.22.1 as builder

RUN apt-get update \
&& apt-get dist-upgrade -y \
Expand Down
23 changes: 10 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
LICENSE := ASL2-Short
VERSION ?= local

check-fmt: goimports go-licenser
@go-licenser -d -license ${LICENSE}
@goimports -l -e -local github.com/elastic . | read && echo "Code differs from gofmt's style. Run 'gofmt -w .'" 1>&2 && exit 1 || true
GOIMPORTS := go run golang.org/x/tools/cmd/goimports@latest
GOLICENSER := go run github.com/elastic/go-licenser@latest

check-fmt:
@${GOLICENSER} -d -license ${LICENSE}
@${GOIMPORTS} -l -e -local github.com/elastic . | read && echo "Code differs from gofmt's style. Run 'gofmt -w .'" 1>&2 && exit 1 || true

docker:
docker build -t docker.elastic.co/observability/stream:${VERSION} .

fmt: goimports go-licenser
go-licenser -license ${LICENSE}
goimports -l -w -local github.com/elastic .

goimports:
GO111MODULE=off go get golang.org/x/tools/cmd/goimports

go-licenser:
GO111MODULE=off go get github.com/elastic/go-licenser
fmt:
${GOLICENSER} -license ${LICENSE}
${GOIMPORTS} -l -w -local github.com/elastic .

.PHONY: check-fmt docker fmt goimports go-licenser
.PHONY: check-fmt docker fmt
68 changes: 34 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
module github.com/elastic/stream

go 1.20
go 1.22

require (
cloud.google.com/go/pubsub v1.36.1
cloud.google.com/go/storage v1.37.0
cloud.google.com/go/pubsub v1.37.0
cloud.google.com/go/storage v1.39.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.0.3
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.0.4
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1
github.com/Shopify/sarama v1.38.1
github.com/elastic/go-concert v0.2.0
github.com/elastic/go-lumber v0.1.2-0.20220819171948-335fde24ea0f
github.com/elastic/go-ucfg v0.8.6
github.com/elastic/go-ucfg v0.8.8
github.com/google/gopacket v1.1.19
github.com/gorilla/mux v1.8.1
github.com/ory/dockertest/v3 v3.9.1
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.26.0
golang.org/x/sys v0.16.0
go.uber.org/zap v1.27.0
golang.org/x/sys v0.18.0
golang.org/x/time v0.5.0
google.golang.org/api v0.161.0
google.golang.org/api v0.170.0
gotest.tools v2.2.0+incompatible
)

require (
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.23.4 // indirect
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute v1.25.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect
github.com/Azure/go-amqp v1.0.4 // indirect
cloud.google.com/go/iam v1.1.7 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/go-amqp v1.0.5 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
Expand All @@ -45,23 +45,23 @@ require (
github.com/docker/docker v20.10.17+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/eapache/go-resiliency v1.5.0 // indirect
github.com/eapache/go-resiliency v1.6.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/googleapis/gax-go/v2 v2.12.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
Expand All @@ -72,7 +72,7 @@ require (
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.17.5 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
Expand All @@ -92,22 +92,22 @@ require (
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/genproto v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 8f45708

Please sign in to comment.