-
Notifications
You must be signed in to change notification settings - Fork 45
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: implement actions waiter #407
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
==========================================
+ Coverage 80.43% 80.69% +0.25%
==========================================
Files 33 34 +1
Lines 5756 5770 +14
==========================================
+ Hits 4630 4656 +26
+ Misses 718 708 -10
+ Partials 408 406 -2 ☔ View full report in Codecov by Sentry. |
704af1e
to
1c3c707
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.
Looking mostly good, I really like the new Interface. This matches what we need in most integrations very well.
Did you already test this code in CLI or some other tool? Would be nice if we had some real life (or e2e
) test usage before releasing.
1c3c707
to
c39b609
Compare
c39b609
to
7bb1a7b
Compare
I fixed the few comments. I didn't use this branch in another project, I'll try it out. |
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.
Great work @jooola! Looking forward to replace all of our home-grown implementations with this one!
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-1.x release-1.x
# Navigate to the new working tree
cd .worktrees/backport-release-1.x
# Create a new branch
git switch --create backport-407-to-release-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1e3fa7033d8a1cea1c0a9007a6255798979f0771
# Push it to GitHub
git push --set-upstream origin backport-407-to-release-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-1.x Then, create a pull request where the |
Implement a simpler and more versatile waiting functions for actions. Most use cases when waiting for actions is to return early if an action fails. If all actions must be waited until completion, the users should use the `WaitForFunc` function. If the final actions objects are needed, the users should use the `WaitForFunc` function to store the final actions using the `handleUpdate` callback. This deprecates the `ActionClient.WatchOverallProgress` and `ActionClient.WatchProgress` methods. (cherry picked from commit 1e3fa70)
Implement a simpler and more versatile waiting functions for actions. Most use cases when waiting for actions is to return early if an action fails. If all actions must be waited until completion, the users should use the `WaitForFunc` function. If the final actions objects are needed, the users should use the `WaitForFunc` function to store the final actions using the `handleUpdate` callback. This deprecates the `ActionClient.WatchOverallProgress` and `ActionClient.WatchProgress` methods. (cherry picked from commit 1e3fa70) BEGIN_COMMIT_OVERRIDE feat: implement actions waiter END_COMMIT_OVERRIDE
🤖 I have created a release *beep* *boop* --- ## [2.8.0](v2.7.2...v2.8.0) (2024-05-06) ### Features * **error:** show internal correlation id in error messages ([#411](#411)) ([6c96d19](6c96d19)) * implement actions waiter ([#407](#407)) ([1e3fa70](1e3fa70)) * require Go >= 1.21 ([#424](#424)) ([d4f4000](d4f4000)) ### Bug Fixes * improve error message format with correlation id ([#430](#430)) ([013477f](013477f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…etznercloud/fleeting-plugin-hetzner!49) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | require | minor | `v2.7.2` -> `v2.8.0` | --- ### Release Notes <details> <summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary> ### [`v2.8.0`](https://github.com/hetznercloud/hcloud-go/releases/tag/v2.8.0) [Compare Source](hetznercloud/hcloud-go@v2.7.2...v2.8.0) ##### Features - **error:** show internal correlation id in error messages ([#​411](hetznercloud/hcloud-go#411)) ([6c96d19](hetznercloud/hcloud-go@6c96d19)) - implement actions waiter ([#​407](hetznercloud/hcloud-go#407)) ([1e3fa70](hetznercloud/hcloud-go@1e3fa70)) - require Go >= 1.21 ([#​424](hetznercloud/hcloud-go#424)) ([d4f4000](hetznercloud/hcloud-go@d4f4000)) ##### Bug Fixes - improve error message format with correlation id ([#​430](hetznercloud/hcloud-go#430)) ([013477f](hetznercloud/hcloud-go@013477f)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDIuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM0Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Implement a simpler and more versatile waiting functions for actions.
Most use cases when waiting for actions is to return early if an action fails. If all actions must be waited until completion, the users should use the
WaitForFunc
function.If the final actions objects are needed, the users should use the
WaitForFunc
function to store the final actions using thehandleUpdate
callback.This deprecates the
ActionClient.WatchOverallProgress
andActionClient.WatchProgress
methods.