Skip to content

Add spinners and progress notifications to CLI output #139

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

Merged
merged 9 commits into from
Sep 28, 2023

Conversation

andrew-farries
Copy link
Collaborator

Add spinners and progress notification to the CLI output.

The start command has progress updates while the other commands just have their output displayed consistently with the start command; no progress updates as these operations are expected to be short-running.

Only the operations that perform backfills currently publish any progress updates as this is the longest running part of any operation.


start:

Screen.Recording.2023-09-26.at.15.18.38.mov

init

image

rollback

image

complete

image

Copy link
Member

@exekias exekias left a comment

Choose a reason for hiding this comment

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

😻

Base automatically changed from fix-golangci-lint to main September 26, 2023 17:48
andrew-farries added a commit that referenced this pull request Sep 26, 2023
Update to the latest version of `golangci-lint`.

Also add an explicit `setup-go` step to the workflow before the
`golangci-lint` step. Without this, `golangci-lint` seems to pick up the
wrong Go version installed on the runners (see the list
[here](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#go)),
causing it to fail when running against #139
Allow the `backfill` function to take callbacks and invoke them on every
batch.
Allow the `Operation.Start` method to take an optional set of callbacks
and pass the callbacks into the `backfill` function.
And pass them into the `Operation.Start` calls.
Add a spinner that shows progress updates on the status of any backfill
operation performed by the start operation.
@andrew-farries andrew-farries merged commit 3e3860f into main Sep 28, 2023
@andrew-farries andrew-farries deleted the add-progress-updates branch September 28, 2023 05:43
andrew-farries added a commit that referenced this pull request Oct 10, 2024
Progress updates showing how many rows have been backfilled during
migration start were added in #139.

Progress updates were then broken in
#289.

Fix the progress updates to restore the intended behaviour from #139 and
add a test to ensure that callbacks are invoked during migration start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants