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

feat: new action waiting progress #749

Merged
merged 13 commits into from
May 8, 2024
Merged

feat: new action waiting progress #749

merged 13 commits into from
May 8, 2024

Conversation

jooola
Copy link
Member

@jooola jooola commented May 6, 2024

This replaces the 2 previous actions progress display with a single consistent one, that leverage the new hcloud.ActionWaiter functions.

Screenshot from 2024-05-08 16-03-01
Screenshot from 2024-05-08 16-03-04

The progress features have been extracted in a dedicated ui package to split the actions waiting and the progress concerns.

@jooola jooola requested a review from a team as a code owner May 6, 2024 15:12
Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 39.51220% with 124 lines in your changes are missing coverage. Please review.

Project coverage is 59.55%. Comparing base (2cd08b2) to head (3cfd745).

Files Patch % Lines
internal/ui/progress_terminal.go 0.00% 29 Missing ⚠️
internal/state/zz_command_helper_mock.go 0.00% 8 Missing ⚠️
internal/cmd/server/shutdown.go 61.11% 4 Missing and 3 partials ⚠️
internal/state/actions.go 78.57% 5 Missing and 1 partial ⚠️
internal/ui/progress.go 40.00% 2 Missing and 4 partials ⚠️
internal/ui/progress_script.go 89.65% 2 Missing and 1 partial ⚠️
internal/cmd/server/create.go 0.00% 0 Missing and 2 partials ⚠️
internal/cmd/base/set_rdns.go 0.00% 1 Missing ⚠️
internal/cmd/certificate/create.go 0.00% 0 Missing and 1 partial ⚠️
internal/cmd/firewall/add_rule.go 0.00% 0 Missing and 1 partial ⚠️
... and 60 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #749      +/-   ##
==========================================
- Coverage   60.27%   59.55%   -0.73%     
==========================================
  Files         180      191      +11     
  Lines        6568     6770     +202     
==========================================
+ Hits         3959     4032      +73     
- Misses       1989     2115     +126     
- Partials      620      623       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

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

Code is all looking good.

One note on the UX, I really liked that we show the elapsed time, as it demonstrates (especiall with server create) how fast Hetzner Cloud is in comparison to most others. But this is personal preference.

@phm07
Copy link
Contributor

phm07 commented May 8, 2024

Looks good! I don't know about the purple text though, maybe something subtle like dark gray would be better.
I see that you created a "fake" action for hcloud server shutdown --wait, it doesn't show any message for me though in my testing.

@jooola
Copy link
Member Author

jooola commented May 8, 2024

image
image

@jooola
Copy link
Member Author

jooola commented May 8, 2024

image

@jooola jooola merged commit 9e30f3f into main May 8, 2024
5 checks passed
@jooola jooola deleted the use-action-waiter branch May 8, 2024 15:28
phm07 added a commit that referenced this pull request May 23, 2024
This PR builds onto #719 by making the deletion of multiple resources
parallel using the new action waiters introduced in #749.
phm07 pushed a commit that referenced this pull request Jun 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.44.0](v1.43.1...v1.44.0)
(2024-06-20)


### Features

* delete multiple resources in parallel
([#761](#761))
([f2fb321](f2fb321))
* improve toml formatting
([#758](#758))
([eacb7dd](eacb7dd))
* **load-balancer:** allow specifying health check options in
add-service ([#743](#743))
([2cd08b2](2cd08b2)),
closes [#742](#742)
* new action waiting progress
([#749](#749))
([9e30f3f](9e30f3f))
* new configuration system, config subcommand
([#736](#736))
([d1c6678](d1c6678))
* **server-type:** add deprecated column to list command
([#780](#780))
([906f864](906f864))
* **server:** add default-ssh-keys option
([#759](#759))
([9b34d26](9b34d26))


### Bug Fixes

* **firewall:** 'create --rules-file' not working with outbound rules
([#752](#752))
([2f2be32](2f2be32)),
closes [#750](#750)
* network list server count format
([#783](#783))
([f69d261](f69d261))
* track progress if the terminal width allows it
([#768](#768))
([069fffe](069fffe)),
closes [#767](#767)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

3 participants