-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not truncate local state file when pulling remote changes #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is OK to overwrite if the sequence number encoded in the state file is higher in the remote version than it is in the local version. To make this work both state files need to be parsed so that the sequence number can be extracted and compared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor issues. Thanks for working on this!
content := []byte(r.content) | ||
n = copy(p, content) | ||
return n, io.EOF | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is implemented by https://pkg.go.dev/strings#NewReader, FWIW. Feel free to address async.
## Changes This release bumps the minor version to 100 to disambiguate between Databricks CLI "v1" (the Python version) and this version, Databricks CLI "v2". This release is a major rewrite of the CLI, and is not backwards compatible. CLI: * Rename bricks -> databricks ([#389](#389)). Bundles: * Added ability for deferred mutator execution ([#380](#380)). * Do not truncate local state file when pulling remote changes ([#382](#382)).
Changes
When local state file exists it won't be override by remote state file
Tests
Running
bricks bundle deploy
after state push failed does not override local state fileUse cases verified: