Skip to content

feat: Add retry logic for bulk imports based on work in the zed CLI #314

feat: Add retry logic for bulk imports based on work in the zed CLI

feat: Add retry logic for bulk imports based on work in the zed CLI #314

Re-run triggered February 12, 2024 21:48
Status Failure
Total duration 2m 33s
Artifacts

lint.yaml

on: pull_request
Lint Go
57s
Lint Go
Generate Protobufs
16s
Generate Protobufs
Lint YAML
22s
Lint YAML
Analyze with Trivy
23s
Analyze with Trivy
Matrix: Analyze with CodeQL
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 7 warnings
Lint Go: v1/retryable_client.go#L1
Please run go run magefile.go deps:tidy. diff --git a/v1/retryable_client.go b/v1/retryable_client.go index 23e21ae..21637d7 100644 --- a/v1/retryable_client.go +++ b/v1/retryable_client.go @@ -4,14 +4,15 @@ import ( "context" "errors" "fmt" + "strings" + "time" + v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/cenkalti/backoff/v4" "github.com/samber/lo" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "strings" - "time" ) // ConflictStrategy is an enumeration type that represents the strategy to be used @@ -124,6 +125,7 @@ func (rc *RetryableClient) RetryableBulkImportRelationships(ctx context.Context, return nil } + func (rc *RetryableClient) writeBatchesWithRetry(ctx context.Context, relationships []*v1.Relationship) error { backoffInterval := backoff.NewExponentialBackOff() backoffInterval.InitialInterval = defaultBackoff
Lint Go
Process completed with exit code 1.
Generate Protobufs
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, buildjet/setup-go@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Lint YAML
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, buildjet/setup-go@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Analyze with Trivy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, github/codeql-action/upload-sarif@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Analyze with Trivy
CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/
Lint Go
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, buildjet/setup-go@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Analyze with CodeQL (go)
CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/
Analyze with CodeQL (go)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, github/codeql-action/init@v2, github/codeql-action/autobuild@v2, github/codeql-action/analyze@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.