Skip to content
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

cli: support DB restore from diff #991

Merged
merged 1 commit into from
May 27, 2020
Merged

cli: support DB restore from diff #991

merged 1 commit into from
May 27, 2020

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented May 27, 2020

Diff dumps provided by NGD contain index of the first block as a first item.
Also do proper error handling.

@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #991 into master-2.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master-2.x     #991   +/-   ##
===========================================
  Coverage       67.97%   67.97%           
===========================================
  Files             145      145           
  Lines           14320    14320           
===========================================
  Hits             9734     9734           
  Misses           4126     4126           
  Partials          460      460           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a783b6...78bd01d. Read the comment docs.

@@ -65,6 +65,10 @@ func NewCommands() []cli.Command {
Name: "dump",
Usage: "directory for storing JSON dumps",
},
cli.BoolFlag{
Name: "diff",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short form?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need it? We have dump already, I think it will only add confusion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't have to be d, but I really like having both long and short forms available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used -d, because --dump is used for debug only and can even be hidden.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, no, -d is for debug. -c for "changeset" is also taken by --count. And most of the words for "difference" are starting with either c or d. So I used k.

cli/server/server.go Outdated Show resolved Hide resolved
Diff dumps provided by NGD contain index of the first block.
Also do proper error handling.
@roman-khimov roman-khimov added this to the v0.75.0 milestone May 27, 2020
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to port it to the master branch also (it's expected to have the same format).

@roman-khimov roman-khimov merged commit 79c87ca into master-2.x May 27, 2020
@roman-khimov roman-khimov deleted the fix/restore branch May 27, 2020 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Completely new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants