-
Notifications
You must be signed in to change notification settings - Fork 22
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
Retry GetExecBatchResults on ApiExceptions caused by GSB Errors #588
Conversation
95f3a9f
to
da2f159
Compare
yapapi/rest/activity.py
Outdated
raise err | ||
num_tries -= 1 | ||
if num_tries: | ||
_log.debug("Retrying ") |
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.
It looks like the message was not finished.
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.
Indeed! Thanks, fixed in c6356d9.
|
||
while num_tries: | ||
try: | ||
results = await self._activity._api.get_exec_batch_results( |
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 conflicts with changes in #548 , which should be merged first.
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.
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.
A similar PR will be a part of the next yajsapi
release. IMO it would be great to backport #548.
In place of 500s I get
|
* Delete unused temp files and close unpublished files in GftpStorageProvider (#543) * Delete unused temp files and close unpublished URLs in GftpStorageProvider * Add unit tests for GftpStorageProvider * Ensure newly created temp files are closed before being used If we keep a file open we won't be able to delete it on Windows * Address code review suggestions Co-authored-by: Kuba Mazurek <[email protected]> * Add team mention to goth nightly failure messages (#575) * Read env var to determine if GftpProvider shoud call `gftp close` (#573) * Read env var to determine if GftpProvider shoud call `gftp close` * Add info on YAPAPI_USE_GFTP_CLOSE env var to README.md * Fix upper bound for expiraio time in no-offers warning (#582) * Check gftp version to determine if `gftp close URL` should be used (#583) * Check gftp version to determine if `gftp close URL` should be used * Add `# type: ignore` to `import semantic_version` * Add unit test for various env var/gftp version combinations * Retry GetExecBatchResults on ApiExceptions caused by GSB Errors (#588) * Implement re-tries for ApiExceptions caused by GSB Errors * Endpoint -> endpoint * Apply fixes after code review * Fixes after code review: part II * debug -> warning * Improve logs when activity is prematurely terminated on the provider * Formatting * Raise BatchError when an activity is terminated by the provider * Add unit tests for PollingBatch behavior when GSB errors occur Co-authored-by: filipgolem <[email protected]> Co-authored-by: Filip <[email protected]> * Bump version to 0.6.3-alpha.0 (#589) * Add semantic-version to dependencies, bump version to 0.6.3-alpha.1 (#591) * Bump version to 0.6.3 (#592) * Fix stable branch name regex in nightly workflow (#593) Co-authored-by: Kuba Mazurek <[email protected]> Co-authored-by: filipgolem <[email protected]> Co-authored-by: Filip <[email protected]>
Fixes #587
Implements the following behaviour for handling ApiExceptions
raised by
get_exec_batch_results()
:When repeating, the maximum number of attempts is 3.