-
Notifications
You must be signed in to change notification settings - Fork 44
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
Create a progress bar for the plan validation #217
Conversation
8b3a640
to
54217c7
Compare
Example output when extracting an index file:
EDIT: In the previous commit I used "Validating", but given that this operation could be repeated if we have an invalid seed, I switched to "ValidatingPlan{number}" to include the attempt number. |
54217c7
to
33a8c20
Compare
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.
Looks good, thank you. If you want there's an opportunity to improve my old code here. If NewProgressBar()
returned something like NullProgressBar
that implements the ProgressBar
interface instead of nil in the non-terminal case, you could get rid of all the nil checks for it thoughout the code (the if pb != nil
bit)
Sure, I should be able to do that tomorrow. |
ProgressBar is not a command and should be placed in the project root directory. This will allow us to create new progress bars from functions that are not located in `cmd/desync`. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Validating a plan could take a non trivial amount of time, depending on the size of a plan and by the I/O speed. With this commit we add a progress bar that shows the status of the validation and prefixes the assembling progress bar with "Assembling ". Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
33a8c20
to
4adbfb3
Compare
With the latest revision I added the suggested |
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.
Thank you
Hmm, looks like the MacOS build breaks due to a lib issue, likely need some built-tags. |
Nope, unrelated build issue in Go 1.18. Fixed in #218 |
Validating a plan could take a non trivial amount of time, depending on
the size of a plan and by the I/O speed.
With this commit we add a progress bar that shows the status of the
validation and prefixes the assembling progress bar with "Assembling ".
I added just the validation and not the actual "planning" because, from my testings, the planning is usually done nearly instantaneously and the progress percentage would just go from 0% to 100%.