Add hint to delete sync snapshot if parsing fails (#853)

## Changes
Example error:
```
Error: error parsing existing sync state. Please delete your existing sync snapshot file (.databricks/sync-snapshots/f3c00bc127903f9b.json) and retry: invalid sync state representation. Remote file footxt is missing the corresponding local file
```

## Tests
Manually
This commit is contained in:
shreyas-goenka 2023-10-09 17:26:46 +02:00 committed by GitHub
parent b4086e4f1d
commit 043e54950d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ func (s *Snapshot) diff(ctx context.Context, all []fileset.File) (diff, error) {
currentState := s.SnapshotState currentState := s.SnapshotState
if err := currentState.validate(); err != nil { if err := currentState.validate(); err != nil {
return diff{}, fmt.Errorf("error parsing existing sync state: %w", err) return diff{}, fmt.Errorf("error parsing existing sync state. Please delete your existing sync snapshot file (%s) and retry: %w", s.SnapshotPath, err)
} }
// Compute diff to apply to get from current state to new target state. // Compute diff to apply to get from current state to new target state.