feat: Add retry logic for bulk imports based on work in the zed CLI #313
lint.yaml
on: pull_request
Lint Go
55s
Generate Protobufs
19s
Lint YAML
25s
Analyze with Trivy
24s
Matrix: Analyze with CodeQL
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 b38adae..019c195 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"
)
type ConflictStrategy int
@@ -118,6 +119,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/.
|