Skip to content

Commit

Permalink
Add hint to delete sync snapshot if parsing fails (#853)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
shreyas-goenka authored Oct 9, 2023
1 parent b4086e4 commit 043e549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/sync/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (s *Snapshot) diff(ctx context.Context, all []fileset.File) (diff, error) {

currentState := s.SnapshotState
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.
Expand Down

0 comments on commit 043e549

Please sign in to comment.