Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internalise Raft lib #292

Merged
merged 17 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ jobs:
with:
go-version-file: go.mod
- name: Install gotestfmt
coufalja marked this conversation as resolved.
Show resolved Hide resolved
uses: GoTestTools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
run: go install github.com/mfridman/tparse@v0.13.3
- name: Test
run: |
go test -json -cover ./... -coverprofile coverage.out -coverpkg ./log/...,./pebble/...,./regattaserver/...,./replication/...,./storage/...,./security/...,./util/... | gotestfmt
set -o pipefail && go test -json -cover ./... -coverprofile coverage.out -coverpkg ./log/...,./pebble/...,./raft/...,./regattaserver/...,./replication/...,./storage/...,./security/...,./util/... | tparse -all
- name: Coverage track
uses: coverallsapp/github-action@v2
with:
Expand Down
6 changes: 4 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ linters:

linters-settings:
gosec:
global:
audit: true
excludes:
- G104
- G304
- G401
- G404
- G501

goheader:
template: Copyright JAMF Software, LLC

issues:
exclude-dirs:
- raft

exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.2
FROM golang:1.22.2-alpine3.19 as builder
FROM golang:1.22.3-alpine3.20 as builder

RUN apk add --update --no-cache build-base tzdata \
&& addgroup -g 1000 -S regatta && adduser -u 1000 -S regatta -G regatta
Expand All @@ -13,7 +13,7 @@ ARG VERSION
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build GOMODCACHE=/go/pkg/mod GOCACHE=/root/.cache/go-build VERSION=${VERSION} make regatta

# Runtime
FROM alpine:3.19
FROM alpine:3.20

ARG VERSION
LABEL org.opencontainers.image.authors="Regatta Developers <regatta@jamf.com>"
Expand Down
2 changes: 1 addition & 1 deletion cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
grpcprom "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/auth"
rl "github.com/jamf/regatta/log"
dbl "github.com/jamf/regatta/raft/logger"
"github.com/jamf/regatta/regattaserver"
"github.com/jamf/regatta/security"
"github.com/jamf/regatta/storage"
"github.com/jamf/regatta/storage/table"
dbl "github.com/lni/dragonboat/v4/logger"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/viper"
"go.uber.org/zap"
Expand Down
39 changes: 18 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@ module github.com/jamf/regatta

go 1.22

toolchain go1.22.2
toolchain go1.22.3

require (
github.com/VictoriaMetrics/metrics v1.33.1
github.com/armon/go-metrics v0.4.1
github.com/benbjohnson/clock v1.3.5
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cockroachdb/pebble v0.0.0-20221207173255-0f086d933dac
github.com/cespare/xxhash/v2 v2.2.0
github.com/cockroachdb/errors v1.11.1
github.com/cockroachdb/pebble v1.1.0
github.com/golang/snappy v0.0.4
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0
github.com/hashicorp/memberlist v0.5.1
github.com/klauspost/compress v1.17.8
github.com/lni/dragonboat/v4 v4.0.0-20231222133740-1d6e2d76cd57
github.com/lni/vfs v0.2.1-0.20220616104132-8852fd867376
github.com/kr/pretty v0.3.1
github.com/lni/goutils v1.4.0
github.com/lni/vfs v0.2.1-0.20231221160030-d43d3c60804c
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
github.com/planetscale/vtprotobuf v0.6.0
github.com/prometheus/client_golang v1.19.1
Expand All @@ -29,32 +33,30 @@ require (
go.uber.org/atomic v1.11.0
go.uber.org/automaxprocs v1.5.3
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/sync v0.7.0
golang.org/x/time v0.5.0
google.golang.org/grpc v1.63.2
google.golang.org/grpc v1.64.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.34.1
)

require (
github.com/DataDog/zstd v1.5.5 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/sentry-go v0.26.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
Expand All @@ -66,17 +68,14 @@ require (
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lni/goutils v1.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
Expand All @@ -95,15 +94,13 @@ require (
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.16.1 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading