From 8fa98d841d338a266c618ac341071fec4be6cc78 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:54:32 +0100 Subject: [PATCH] prog --- pruner/checkpoint.go | 3 +++ pruner/checkpoint_test.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pruner/checkpoint.go b/pruner/checkpoint.go index 4abd80c18b..9ad579a417 100644 --- a/pruner/checkpoint.go +++ b/pruner/checkpoint.go @@ -40,6 +40,9 @@ func DetectPreviousRun(ctx context.Context, ds datastore.Datastore, expectedKind cp, err := getCheckpoint(ctx, wrappedDs) if err != nil { + if errors.Is(err, errCheckpointNotFound) { + return nil + } return fmt.Errorf("failed to load checkpoint: %w", err) } diff --git a/pruner/checkpoint_test.go b/pruner/checkpoint_test.go index d91fff8aae..6eaf92a1ce 100644 --- a/pruner/checkpoint_test.go +++ b/pruner/checkpoint_test.go @@ -2,12 +2,12 @@ package pruner import ( "context" - "github.com/ipfs/go-datastore/namespace" - "github.com/stretchr/testify/assert" "testing" "github.com/ipfs/go-datastore" + "github.com/ipfs/go-datastore/namespace" ds_sync "github.com/ipfs/go-datastore/sync" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )