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

[MOD-3614]: pyright _container_io_manager #2179

Conversation

kramstrom
Copy link
Contributor

@kramstrom kramstrom commented Sep 2, 2024

Include _container_io_manager in pyright typing checks

@kramstrom kramstrom marked this pull request as ready for review September 3, 2024 07:53
@kramstrom kramstrom requested a review from freider September 3, 2024 07:53
Copy link
Contributor

@freider freider left a comment

Choose a reason for hiding this comment

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

Nice! Some minor comments

@@ -296,7 +297,7 @@ def _init(self, container_args: api_pb2.ContainerArguments, client: _Client):
self._fetching_inputs = True

self._client = client
assert isinstance(self._client, _Client)
# assert isinstance(self._client, _Client)
Copy link
Contributor

Choose a reason for hiding this comment

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

Intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No 😄

try:
return self.serialize(exc)
except Exception as serialization_exc:
logger.info(f"Failed to serialize exception {exc}: {serialization_exc}")
# We can't always serialize exceptions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to keep the logging here, and in the serialization error print out type(exc) as well since the stringification of many exceptions is an empty string, e.g.:

>>> str(KeyboardInterrupt())
''

@kramstrom kramstrom requested a review from freider September 3, 2024 08:08
@kramstrom kramstrom merged commit 89d4a00 into main Sep 3, 2024
22 checks passed
@kramstrom kramstrom deleted the kramstrom/mod-3614-unserializable-user-exceptions-cause-infinite-retry-loops branch September 3, 2024 10:25
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.

2 participants