Skip to content

Commit 9927bf2

Browse files
authored
Golang and deps bump (#39)
* bumping golang and deps * bumping ES client * CI and Dockerfile fix
1 parent 675d7ec commit 9927bf2

File tree

7 files changed

+836
-67
lines changed

7 files changed

+836
-67
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-go@v4
1818
with:
19-
go-version: "1.21.3"
19+
go-version: "1.22.3"
2020
cache: false
2121
- name: golangci-lint
2222
uses: golangci/golangci-lint-action@v3
2323
with:
24-
version: v1.54.2
24+
version: v1.58.0
2525

2626
test:
2727
strategy:
@@ -34,7 +34,7 @@ jobs:
3434
name: tests on ES ${{ matrix.esVersion }}
3535

3636
runs-on: ubuntu-latest
37-
container: golang:1.21.3-bookworm
37+
container: golang:1.22.3-bookworm
3838

3939
services:
4040
eventstore:

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v4
2222
with:
23-
go-version: 1.21.3
23+
go-version: 1.22.3
2424
- name: Run GoReleaser
2525
uses: goreleaser/goreleaser-action@v5
2626
with:
2727
distribution: goreleaser
28-
version: 1.21.2
28+
version: 1.25.1
2929
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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-alpine as build
1+
FROM golang:1.22.3-alpine as build
22

33
WORKDIR /go/src/github.com/marcinbudny/eventstore_exporter
44
COPY . ./

go.mod

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
module github.com/marcinbudny/eventstore_exporter
22

3-
go 1.21
3+
go 1.22.3
44

55
require (
6-
github.com/EventStore/EventStore-Client-Go/v3 v3.1.0
7-
github.com/gofrs/uuid/v5 v5.0.0
6+
github.com/EventStore/EventStore-Client-Go/v3 v3.3.0
7+
github.com/gofrs/uuid/v5 v5.1.0
88
github.com/google/go-cmp v0.6.0
99
github.com/hashicorp/go-version v1.6.0
1010
github.com/namsral/flag v1.7.4-pre
11-
github.com/prometheus/client_golang v1.17.0
12-
github.com/prometheus/client_model v0.5.0
13-
github.com/prometheus/common v0.45.0
11+
github.com/prometheus/client_golang v1.19.0
12+
github.com/prometheus/client_model v0.6.1
13+
github.com/prometheus/common v0.53.0
1414
github.com/sirupsen/logrus v1.9.3
15-
golang.org/x/sync v0.4.0
15+
golang.org/x/sync v0.7.0
1616
)
1717

1818
require (
19+
github.com/Microsoft/go-winio v0.6.2 // indirect
1920
github.com/beorn7/perks v1.0.1 // indirect
20-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
21+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
22+
github.com/containerd/continuity v0.4.3 // indirect
23+
github.com/docker/go-connections v0.5.0 // indirect
24+
github.com/docker/go-units v0.5.0 // indirect
2125
github.com/gofrs/uuid v4.4.0+incompatible // indirect
22-
github.com/golang/protobuf v1.5.3 // indirect
23-
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
24-
github.com/prometheus/procfs v0.12.0 // indirect
25-
golang.org/x/net v0.17.0 // indirect
26-
golang.org/x/sys v0.13.0 // indirect
27-
golang.org/x/text v0.13.0 // indirect
28-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
29-
google.golang.org/grpc v1.59.0 // indirect
30-
google.golang.org/protobuf v1.31.0 // indirect
26+
github.com/moby/term v0.5.0 // indirect
27+
github.com/opencontainers/image-spec v1.1.0 // indirect
28+
github.com/prometheus/procfs v0.14.0 // indirect
29+
github.com/stretchr/testify v1.9.0 // indirect
30+
golang.org/x/net v0.25.0 // indirect
31+
golang.org/x/sys v0.20.0 // indirect
32+
golang.org/x/text v0.15.0 // indirect
33+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae // indirect
34+
google.golang.org/grpc v1.63.2 // indirect
35+
google.golang.org/protobuf v1.34.1 // indirect
3136
)

go.sum

Lines changed: 799 additions & 34 deletions
Large diffs are not rendered by default.

internal/client/subscription_stats.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,18 @@ func getParkedMessagesLastEventNumber(ctx context.Context, grpcClient *esdb.Clie
146146
}
147147

148148
func getParkedMessagesTruncateBeforeValue(ctx context.Context, grpcClient *esdb.Client, eventStreamID string, groupName string) (uint64, error) {
149-
if meta, err := grpcClient.GetStreamMetadata(ctx, parkedStreamID(eventStreamID, groupName), esdb.ReadStreamOptions{}); err == nil {
149+
meta, err := grpcClient.GetStreamMetadata(ctx, parkedStreamID(eventStreamID, groupName), esdb.ReadStreamOptions{})
150+
if err == nil {
150151
return *meta.TruncateBefore(), nil
151152
} else if strings.Contains(err.Error(), "not found") {
152153
return 0, nil
153-
} else {
154-
log.WithError(err).WithFields(log.Fields{
155-
"eventStreamId": eventStreamID,
156-
"groupName": groupName,
157-
}).Error("Error when getting parked message stream metadata")
158-
159-
return 0, err
160-
161154
}
155+
log.WithError(err).WithFields(log.Fields{
156+
"eventStreamId": eventStreamID,
157+
"groupName": groupName,
158+
}).Error("Error when getting parked message stream metadata")
159+
160+
return 0, err
162161
}
163162

164163
func parkedStreamID(eventStreamID string, groupName string) string {

internal/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (server *ExporterServer) serveLandingPage() {
5454
</html>
5555
`)
5656

57-
server.mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
57+
server.mux.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
5858
w.Write(landingPage) // nolint: errcheck
5959
})
6060
}

0 commit comments

Comments
 (0)