Skip to content

Commit

Permalink
Merge pull request #308 from authzed/support-canceling-bulk-load
Browse files Browse the repository at this point in the history
support canceling long-running backup/restore operations
  • Loading branch information
jzelinskie authored Nov 6, 2023
2 parents 7225cfb + f0c4b46 commit 7942023
Show file tree
Hide file tree
Showing 9 changed files with 290 additions and 178 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ on: # yamllint disable-line rule:truthy
merge_group:
types:
- "checks_requested"
env:
GO_VERSION: "~1.21.3"
jobs:
build:
name: "Build Binary"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "~1.20"
go-version: "${{ env.GO_VERSION }}"
- uses: "authzed/actions/go-build@main"

image-build:
Expand All @@ -34,10 +36,9 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "${{ env.GO_VERSION }}"
cache: "true"
- uses: "authzed/action-spicedb@v1"
- uses: "authzed/actions/go-test@main"

Expand All @@ -46,7 +47,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "${{ env.GO_VERSION }}"
cache: "false" # do not cache to prevent cache poisoning
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ on: # yamllint disable-line rule:truthy
merge_group:
types:
- "checks_requested"
env:
GO_VERSION: "~1.21.3"
jobs:
go-lint:
name: "Lint Go"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "~1.20"
go-version: "${{ env.GO_VERSION }}"
- uses: "authzed/actions/gofumpt@main"
- uses: "authzed/actions/go-mod-tidy@main"
- uses: "authzed/actions/go-generate@main"
Expand All @@ -45,6 +47,9 @@ jobs:
language: ["go"]
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "${{ env.GO_VERSION }}"
- uses: "authzed/actions/codeql@main"

trivy-fs:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
GO_VERSION: "~1.21.3"
jobs:
github:
runs-on: "macos-latest"
Expand All @@ -16,9 +18,9 @@ jobs:
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-gnu aarch64-unknown-linux-musl mingw-w64
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
- uses: "actions/setup-go@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "~1.20"
go-version: "${{ env.GO_VERSION }}"
- uses: "goreleaser/goreleaser-action@v3"
with:
distribution: "goreleaser-pro"
Expand All @@ -43,9 +45,9 @@ jobs:
dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}"
- name: "Install linux cross-compilers"
run: "sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu gcc-mingw-w64-x86-64"
- uses: "actions/setup-go@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "~1.20"
go-version: "${{ env.GO_VERSION }}"
- uses: "goreleaser/goreleaser-action@v3"
with:
distribution: "goreleaser-pro"
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-alpine3.18 AS zed-builder
FROM golang:1.21-alpine3.18 AS zed-builder
WORKDIR /go/src/app
RUN apk update && apk add --no-cache git
COPY . .
Expand Down
91 changes: 47 additions & 44 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
module github.com/authzed/zed

go 1.20
go 1.21

toolchain go1.21.3

require (
github.com/99designs/keyring v1.2.2
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2
github.com/authzed/authzed-go v0.9.1-0.20230808160157-67ca5a9f8322
github.com/authzed/grpcutil v0.0.0-20230703173955-bdd0ac3f16a5
github.com/authzed/spicedb v1.24.0-rc1.0.20230808182745-026190fb4d45
github.com/authzed/authzed-go v0.10.1
github.com/authzed/grpcutil v0.0.0-20230908193239-4286bb1d6403
github.com/authzed/spicedb v1.27.0-rc1
github.com/brianvoe/gofakeit/v6 v6.22.0
github.com/charmbracelet/lipgloss v0.7.1
github.com/gookit/color v1.5.3
github.com/gookit/color v1.5.4
github.com/hamba/avro/v2 v2.13.0
github.com/jzelinskie/cobrautil v0.0.12
github.com/jzelinskie/cobrautil/v2 v2.0.0-20230714172849-80717639cec5
github.com/jzelinskie/cobrautil/v2 v2.0.0-20231016191810-9f8a4f6d038a
github.com/jzelinskie/stringz v0.0.2
github.com/mattn/go-isatty v0.0.19
github.com/mitchellh/go-homedir v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/rs/zerolog v1.29.1
github.com/rs/zerolog v1.31.0
github.com/schollz/progressbar/v3 v3.13.1
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
github.com/xlab/treeprint v1.2.0
golang.org/x/mod v0.12.0
golang.org/x/sync v0.3.0
golang.org/x/term v0.11.0
google.golang.org/grpc v1.56.2
golang.org/x/mod v0.13.0
golang.org/x/sync v0.4.0
golang.org/x/term v0.13.0
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 // indirect
github.com/authzed/cel-go v0.17.5 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
Expand All @@ -46,7 +49,7 @@ require (
github.com/creasty/defaults v1.7.0 // indirect
github.com/dalzilio/rudd v1.1.1-0.20230806153452-9e08a6ea8170 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/ecordell/optgen v0.0.10-0.20230609182709-018141bf9698 // indirect
Expand All @@ -59,14 +62,13 @@ require (
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/cel-go v0.17.1 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v43 v43.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.5 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-memdb v1.3.4 // indirect
Expand All @@ -92,46 +94,47 @@ require (
github.com/mtibben/percent v0.2.1 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/scylladb/go-set v1.0.2 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/spf13/viper v1.17.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.17.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.17.0 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.20.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/sdk v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/exp v0.0.0-20230807204917-050eac23e9de // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
google.golang.org/genproto v0.0.0-20230724170836-66ad5b6ff146 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230724170836-66ad5b6ff146 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230724170836-66ad5b6ff146 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 7942023

Please sign in to comment.