-
Notifications
You must be signed in to change notification settings - Fork 43
feat: wait for actions using ActionsClient.wait_for
#508
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
==========================================
+ Coverage 93.43% 93.48% +0.04%
==========================================
Files 64 65 +1
Lines 3048 3115 +67
==========================================
+ Hits 2848 2912 +64
- Misses 200 203 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ActionsClient.wait_for
and ActionsClient.wait_for_func
ActionsClient.{wait_for,wait_for_function}
ActionsClient.{wait_for,wait_for_function}
ActionsClient.wait_for
34685b8
to
4639148
Compare
hcloud/actions/client.py
Outdated
raise ActionGroupException( | ||
[ActionTimeoutException(action=action) for action in running] | ||
) |
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.
This hides/ignores any errors for actions that already completed. Should they be included in the Exception or should users that want this behavior pass their own handle_update
callable and track these action errors themselves?
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.
Not entirely sure about this one.
I doubt there is a use case for having the actions that succeeded, we are more focused on the actions that timeout.
I think usage will tell, so I'll start using this in the ansible collection and see how this works 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.
Sorry, I was not clear enough. Besides the actions that time out, maybe the user is also interested in the actions that errored, to show a full picture of the issues.
8064421
to
0a0046a
Compare
This function allows the users to wait for multiple actions in an efficient way. All actions are queried using a single call, which reduce the potential for running into rate limits.
This function allows the users to wait for multiple actions in an efficient way. All actions are queried using a single call, which reduce the potential for running into rate limits.