Skip to content

Conversation

@filintod
Copy link

@filintod filintod commented Nov 8, 2025

This is a split from asyncio PR #13 . Removing changes not related to asyncio changes

@filintod filintod requested a review from a team as a code owner November 8, 2025 17:41
self._stub = stubs.TaskHubSidecarServiceStub(channel)
self._logger = shared.get_logger("client", log_handler, log_formatter)

def __enter__(self):
Copy link
Author

Choose a reason for hiding this comment

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

add context manager option for clean closing

# gRPC timeout mapping (pytest unit tests may pass None explicitly)
grpc_timeout = None if (timeout is None or timeout == 0) else timeout

# If timeout is None or 0, skip pre-checks/polling and call server-side wait directly
Copy link
Author

Choose a reason for hiding this comment

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

improves resource consumption on server side that might also lag behind client side

@@ -0,0 +1,48 @@
[mypy]
Copy link
Author

Choose a reason for hiding this comment

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

this is actually not used yet. just as reference. We'll need to run mypy and there are lots of changes required to make it pass

pass


class NonRetryableError(Exception):
Copy link
Author

Choose a reason for hiding this comment

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

this is a new helper, that is present in Temporal but not us, where we can defined errors that are non-retryable so activities don't attempt to retry when raised

next_delay_f, self._retry_policy.max_retry_interval.total_seconds()
)
return timedelta(seconds=next_delay_f)
return timedelta(seconds=next_delay_f)
Copy link
Author

Choose a reason for hiding this comment

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

this fixes a bug with retry, as the login in line 400 above f datetime.utcnow() < retry_expiration: means that we should retry, but as this was badly indented if for some reason max_retry_interval is not none this was not working.

Copy link
Author

@filintod filintod Nov 9, 2025

Choose a reason for hiding this comment

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

this is also kind of mentioned in one of the gotchas in dapr/python-sdk#836, I found this bug beforehand, the other gotchas are gotchas or not-explained behavior

@@ -0,0 +1,16 @@
apiVersion: dapr.io/v1alpha1
Copy link
Author

Choose a reason for hiding this comment

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

needed for e2e tests with dapr that should sub durabletask-go tests

…nistic functions similar to dotnet

Signed-off-by: Filinto Duran <[email protected]>
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.

1 participant