Skip to content

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

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 #312

Re-run triggered February 12, 2024 21:32
Status Failure
Total duration 1m 50s
Artifacts

lint.yaml

on: pull_request
Lint Go
57s
Lint Go
Generate Protobufs
19s
Generate Protobufs
Lint YAML
30s
Lint YAML
Analyze with Trivy
21s
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 51c84cc..a3b79b2 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" ) //---------------------------------------- @@ -107,7 +108,6 @@ func (rc *RetryableClient) RetryableBulkImportRelationships(ctx context.Context, // it was a successful transaction commit without duplicates if resp != nil { - //if expectedLoaded != resp.NumLoaded { // log.Warn().Uint64("loaded", resp.NumLoaded).Uint64("expected", expectedLoaded).Msg("unexpected number of relationships loaded") //} @@ -115,6 +115,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/.
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 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/.
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/.