Skip to content

Commit 2758f60

Browse files
authored
Merge pull request #221 from relab/meling/release/v0.9.0-devel
Gorums release v0.9.0-devel
2 parents c0a4771 + a1eeff2 commit 2758f60

File tree

96 files changed

+1193
-1467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1193
-1467
lines changed

.github/workflows/go-test.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
test:
1010
strategy:
1111
matrix:
12-
go-version: ["1.22"]
12+
go-version: ["1.24.1"]
1313
platform: [ubuntu-latest, macos-latest]
1414
runs-on: ${{ matrix.platform }}
1515

1616
steps:
1717
- name: Cache Go Modules
18-
uses: actions/cache@v3
18+
uses: actions/cache@v4
1919
with:
2020
path: |
2121
~/.cache/go-build # ubuntu-latest
@@ -26,17 +26,17 @@ jobs:
2626
${{ runner.os }}-go-
2727
2828
- name: Checkout code
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030

3131
- name: Set up Go
32-
uses: actions/setup-go@v3
32+
uses: actions/setup-go@v5
3333
with:
3434
go-version: ${{ matrix.go-version }}
3535

3636
- name: Install Protoc
3737
uses: arduino/setup-protoc@v3.0.0
3838
with:
39-
version: "29.2"
39+
version: "29.3"
4040
include-pre-releases: true
4141
repo-token: ${{ secrets.GITHUB_TOKEN }}
4242

.github/workflows/golangci-lint.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Cache Go Modules
17-
uses: actions/cache@v3
17+
uses: actions/cache@v4
1818
with:
1919
path: |
2020
~/.cache/go-build # ubuntu-latest
@@ -25,17 +25,17 @@ jobs:
2525
${{ runner.os }}-go-
2626
2727
- name: Checkout code
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: Set up Go
31-
uses: actions/setup-go@v3
31+
uses: actions/setup-go@v5
3232
with:
33-
go-version: "1.22"
33+
go-version: "1.24.1"
3434

3535
- name: Setup Protoc
3636
uses: arduino/setup-protoc@v3.0.0
3737
with:
38-
version: "29.2"
38+
version: "29.3"
3939
include-pre-releases: true
4040
repo-token: ${{ secrets.GITHUB_TOKEN }}
4141

.gitignore

+3-14
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ _obj
88
_test
99

1010
# Architecture specific extensions/prefixes
11-
*.[568vq]
12-
[568vq].out
13-
14-
*.cgo1.go
15-
*.cgo2.c
16-
_cgo_defun.c
17-
_cgo_gotypes.go
18-
_cgo_export.*
19-
20-
_testmain.go
21-
2211
*.exe
2312
*.test
2413
*.prof
@@ -36,10 +25,10 @@ Session.vim
3625

3726
# binary files
3827
cmd/benchmark/benchmark
39-
40-
ideas.txt
41-
4228
cmd/protoc-gen-gorums/gengorums/template_static.go.bak
29+
ideas.txt
30+
all-to-all.md
4331

4432
# jetbrains IDE files
4533
.idea/
34+
go.work.sum

.vscode/cspell.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// flagWords - list of words to be always considered incorrect.
3+
// This is useful for common spelling errors too short to be considered.
4+
// For example "hte" should be "the"
5+
"flagWords": [
6+
"hte",
7+
"teh"
8+
],
9+
"dictionaries": [
10+
"gorums"
11+
],
12+
"dictionaryDefinitions": [
13+
{
14+
"name": "gorums",
15+
"path": "./gorums.txt",
16+
// Some extensions use `addWords` for adding words to your personal dictionary.
17+
"addWords": true
18+
}
19+
]
20+
}

.vscode/extensions.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"xaver.clang-format",
4+
"streetsidesoftware.code-spell-checker",
5+
"golang.go",
6+
"davidanson.vscode-markdownlint",
7+
"zxh404.vscode-proto3",
8+
"github.vscode-pull-request-github",
9+
"redhat.vscode-yaml"
10+
]
11+
}

.vscode/gorums.txt

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ calltype
55
calltypes
66
checkf
77
clevel
8+
compiletests
89
cpuprofile
910
descriptorpb
1011
devel
@@ -13,17 +14,21 @@ donech
1314
emptypb
1415
Erevik
1516
errcheck
17+
errgroup
1618
extendee
1719
Frausing's
1820
fset
1921
gengorums
22+
genproto
2023
GOBIN
2124
godoc
2225
golangci
26+
goleak
2327
GOPATH
2428
gopls
2529
gorelease
2630
goroutines
31+
gorums
2732
Gorums
2833
gorumsexample
2934
grpc
@@ -45,6 +50,7 @@ memprofile
4550
multicast
4651
naddr
4752
obj's
53+
oneway
4854
Paxos
4955
Pedersen
5056
pkgs
@@ -63,15 +69,19 @@ qspec
6369
quorumcall
6470
Reconf
6571
relab
72+
reservednames
6673
rlevel
6774
RPC's
6875
RPCs
6976
semver
7077
shlex
7178
srvs
79+
stressdev
80+
stressgen
7281
struct
7382
syncrq
7483
testprotos
84+
testrace
7585
timestamppb
7686
tmpl
7787
Tormod

.vscode/settings.json

+65-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
{
2-
"protoc": {
3-
"compile_on_save": false,
4-
"options": [
5-
"--proto_path=${workspaceRoot}",
6-
"--proto_path=${workspaceRoot}/cmd/protoc-gen-gorums/dev",
7-
"--proto_path=${workspaceRoot}/third_party"
8-
]
9-
},
2+
"breadcrumbs.enabled": true,
103
"cSpell.enabled": true,
11-
"cSpell.showStatus": true,
124
"cSpell.languageSettings": [
135
{
146
// use with Markdown files
@@ -19,15 +11,71 @@
1911
]
2012
}
2113
],
22-
"cSpell.customWorkspaceDictionaries": [
23-
{
24-
"addWords": true,
25-
"name": "gorums",
26-
"path": "${workspaceRoot}/.vscode/gorums.txt"
27-
}
14+
"cSpell.ignorePaths": [
15+
"vscode-extension",
16+
".git/{info,lfs,logs,refs,objects}/**",
17+
".git/{index,*refs,*HEAD}",
18+
".vscode",
19+
".vscode-insiders",
20+
"go.mod",
21+
"go.sum",
22+
"go.work.sum",
23+
"**/**/*.pb.go"
2824
],
25+
"editor.formatOnPaste": true,
26+
"editor.formatOnSave": true,
27+
"editor.inlineSuggest.enabled": true,
28+
"editor.codeActionsOnSave": {
29+
"source.fixAll": "explicit"
30+
},
31+
"files.exclude": {
32+
"**/.git": true,
33+
"**/.DS_Store": true,
34+
},
35+
"files.insertFinalNewline": true,
36+
"files.trimFinalNewlines": true,
37+
"files.trimTrailingWhitespace": true,
38+
"git.inputValidation": true,
39+
"git.inputValidationSubjectLength": 72,
40+
"git.inputValidationLength": 72,
2941
"go.lintTool": "golangci-lint",
3042
"go.lintFlags": [
31-
"--fast",
32-
]
43+
"--fast"
44+
],
45+
"go.useLanguageServer": true,
46+
"gopls": {
47+
"formatting.gofumpt": true,
48+
"build.directoryFilters": [
49+
"-doc",
50+
"-x",
51+
],
52+
// Add parameter placeholders when completing a function.
53+
"usePlaceholders": true,
54+
"staticcheck": false
55+
},
56+
"protoc": {
57+
"compile_on_save": false,
58+
"options": [
59+
"--proto_path=${workspaceRoot}",
60+
"--proto_path=${workspaceRoot}/cmd/protoc-gen-gorums/dev",
61+
"--proto_path=${workspaceRoot}/third_party"
62+
]
63+
},
64+
"clang-format.executable": "/usr/bin/clang-format",
65+
"clang-format.style": "{ IndentWidth: 4, BasedOnStyle: google, AlignConsecutiveAssignments: true, ColumnLimit: 120 }",
66+
"[proto3]": {
67+
"editor.defaultFormatter": "zxh404.vscode-proto3"
68+
},
69+
"markdownlint.config": {
70+
"MD024": false,
71+
"default": true,
72+
"no-hard-tabs": {
73+
"code_blocks": false
74+
}
75+
},
76+
"yaml.format.enable": true,
77+
"[yaml]": {
78+
"editor.tabSize": 4,
79+
"editor.formatOnSave": true,
80+
}
3381
}

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ static_files := $(shell find $(dev_path) -name "*.go" -not -name "zorums*" -no
88
proto_path := $(dev_path):third_party:.
99

1010
plugin_deps := gorums.pb.go internal/correctable/opts.pb.go $(static_file)
11+
runtime_deps := ordering/ordering.pb.go ordering/ordering_grpc.pb.go
1112
benchmark_deps := benchmark/benchmark.pb.go benchmark/benchmark_gorums.pb.go
1213

1314
.PHONY: all dev tools bootstrapgorums installgorums benchmark test compiletests
1415

1516
all: dev benchmark compiletests
1617

17-
dev: installgorums ordering/ordering.pb.go ordering/ordering_grpc.pb.go
18+
dev: installgorums $(runtime_deps)
1819
@rm -f $(dev_path)/zorums*.pb.go
1920
@protoc -I=$(proto_path) \
2021
--go_out=:. \
@@ -41,8 +42,7 @@ $(static_file): $(static_files)
4142
@protoc -I=$(proto_path) --gorums_out=paths=source_relative:. $^
4243

4344
tools:
44-
@go mod download
45-
@cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -I % go install %
45+
@go install tool
4646

4747
installgorums: bootstrapgorums $(gen_files) $(plugin_deps) Makefile
4848
@go install $(PLUGIN_PATH)

benchmark/benchmark.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func runQCBenchmark(opts Options, cfg *Configuration, f qcFunc) (*Result, error)
4444
s := &Stats{}
4545
var g errgroup.Group
4646

47-
for n := 0; n < opts.Concurrent; n++ {
47+
for range opts.Concurrent {
4848
g.Go(func() error {
4949
warmupEnd := time.Now().Add(opts.Warmup)
5050
for !time.Now().After(warmupEnd) {
@@ -70,7 +70,7 @@ func runQCBenchmark(opts Options, cfg *Configuration, f qcFunc) (*Result, error)
7070
}
7171

7272
s.Start()
73-
for n := 0; n < opts.Concurrent; n++ {
73+
for range opts.Concurrent {
7474
g.Go(func() error {
7575
endTime := time.Now().Add(opts.Duration)
7676
for !time.Now().After(endTime) {
@@ -130,7 +130,7 @@ func runAsyncQCBenchmark(opts Options, cfg *Configuration, f asyncQCFunc) (*Resu
130130
return nil
131131
}
132132

133-
for n := 0; n < opts.Concurrent; n++ {
133+
for range opts.Concurrent {
134134
g.Go(warmupFunc)
135135
}
136136
err := g.Wait()
@@ -166,7 +166,7 @@ func runAsyncQCBenchmark(opts Options, cfg *Configuration, f asyncQCFunc) (*Resu
166166
}
167167

168168
s.Start()
169-
for n := 0; n < opts.Concurrent; n++ {
169+
for range opts.Concurrent {
170170
g.Go(benchmarkFunc)
171171
}
172172
err = g.Wait()
@@ -203,7 +203,7 @@ func runServerBenchmark(opts Options, cfg *Configuration, f serverFunc) (*Result
203203
}
204204

205205
warmupEnd := time.Now().Add(opts.Warmup)
206-
for n := 0; n < opts.Concurrent; n++ {
206+
for range opts.Concurrent {
207207
go benchmarkFunc(warmupEnd)
208208
}
209209
err := g.Wait()
@@ -218,7 +218,7 @@ func runServerBenchmark(opts Options, cfg *Configuration, f serverFunc) (*Result
218218

219219
runtime.ReadMemStats(&start)
220220
endTime := time.Now().Add(opts.Duration)
221-
for n := 0; n < opts.Concurrent; n++ {
221+
for range opts.Concurrent {
222222
benchmarkFunc(endTime)
223223
}
224224
err = g.Wait()

0 commit comments

Comments
 (0)