backup: clean partial scan cache on create failure - #2288
backup: clean partial scan cache on create failure#2288ousamabenyounes wants to merge 3 commits into
Conversation
omar-polo
left a comment
There was a problem hiding this comment.
I'm not sure, but aren't we already removing the packfile directory a few lines above (see backup.go:298) so how is this changing anything?
(also, it's not really a scan cache, that's something we don't really have anymore, but rather the storage for packfiles that are in the process of being created)
8e747b5 to
a4d0ff5
Compare
|
Sorry for the delayed reply, and thanks for the review. You're right that this PR doesn't fix #2254 as reported. Line 298 removes The current Plakar workaround duplicates kloset's internal path and only cleans I think this needs two separate changes:
I'll close this PR unless you'd prefer to keep it as limited hardening. Happy to |
Summary
snapshot.Createso Plakar can identify the scan cache path for that attemptTesting
go test ./subcommands/backup -run TestBackupCleansPartialScanCacheOnCreateFailure -count=1failed because the partial scan cache directory remainedgo test ./subcommands/backup -run TestBackupCleansPartialScanCacheOnCreateFailure -count=1go test ./subcommands/backup -count=1go test ./subcommands/pkg -count=1 && go test ./subcommands/backup -count=1go build -v ./...,go test -v -p 4 -coverprofile=coverage.out -covermode=atomic -timeout 2m ./...,GOOS=windows GOARCH=amd64 go build -v .Refs #2254