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

now pylzy does not abort workflow in case of grpc error[WIP] #1074

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhvkgj
Copy link
Contributor

@zhvkgj zhvkgj commented Jul 5, 2023

No description provided.

@zhvkgj zhvkgj requested review from vhaldemar and ArtoLord July 5, 2023 14:00
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Unit Test Results

386 tests   379 ✔️  19m 13s ⏱️
  75 suites      7 💤
  75 files        0

Results for commit 435a5e2.

Comment on lines +46 to +54
self,
name: str,
owner: "Lzy",
env: Env,
provisioning: Provisioning,
auto_py_env: PyEnv,
*,
eager: bool = False,
interactive: bool = True
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove tab here please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@@ -167,6 +171,8 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
finally:
if exc_type is None:
self.__destroy()
elif exc_type is AioRpcError:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here may be UNAVAILABLE, so we must abort wf in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

UNAVAILABLE is retryable error. Python lzy-client should repeat request in case. If after an amount of attempts lzy service is still unavailable so I believe that it is really UNAVAILABLE and an abort request is useless :)

@@ -145,6 +147,8 @@ def __enter__(self) -> "LzyWorkflow":
self.__snapshot = DefaultSnapshot(self.owner.serializer_registry, storage_uri, self.owner.storage_client,
self.owner.storage_name)
return self
except AioRpcError as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

except AioRpcError:
    raise

@@ -167,6 +171,8 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
finally:
if exc_type is None:
self.__destroy()
elif exc_type is AioRpcError:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think isinstance(e, AioRpcError) would be more accurate here

@zhvkgj zhvkgj changed the title now pylzy does not abort workflow in case of grpc error now pylzy does not abort workflow in case of grpc error[WIP] Jul 7, 2023
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.

None yet

3 participants