Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7666cdc
Sketch standalone activity client APIs
dandavison Oct 2, 2025
c725d71
Partial revert
dandavison Oct 7, 2025
b5d2d2f
Update core: https://github.com/temporalio/api/pull/640
dandavison Oct 8, 2025
896fc87
Test standalone activity
dandavison Oct 8, 2025
32ff692
poe gen-protos-docker
dandavison Oct 8, 2025
c78fee7
Implement list/count activities
dandavison Oct 8, 2025
e6f6ca2
alphabetical order
dandavison Oct 8, 2025
51f7da8
ActivityHandle.result
dandavison Oct 8, 2025
7781c2a
Implement start_activity
dandavison Oct 8, 2025
ecbaed9
Update sdk-core
dandavison Oct 8, 2025
4a4a731
Server isn't returning RunID yet
dandavison Oct 9, 2025
32f5abb
Add activity IDs to test since they are now set in context
dandavison Oct 10, 2025
d28ae5b
Eliminate base serialization context class
dandavison Oct 10, 2025
741603f
Extend tests
dandavison Oct 10, 2025
1e75e38
Don't hardcode workflow IDs
dandavison Oct 10, 2025
e069732
Fix AsyncActivityHandle
dandavison Oct 10, 2025
e37c625
TEMP: Alter manual activity tests to not require worker
dandavison Oct 10, 2025
269d532
Skip tests globally
dandavison Oct 10, 2025
4d355d1
Revert "TEMP: Alter manual activity tests to not require worker"
dandavison Oct 11, 2025
976532d
Assert describe returns new state after transition
dandavison Oct 13, 2025
92faa7f
Fix cancellation and failure tests
dandavison Oct 13, 2025
ea402d9
Cleanup
dandavison Oct 13, 2025
af9f80a
Add experimental notices
dandavison Oct 13, 2025
48d5ddc
Workaround mypy bug
dandavison Oct 13, 2025
d71fe31
Skip Standalone Activity tests in CI
dandavison Oct 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions temporalio/activity.py
Copy link
Member

Choose a reason for hiding this comment

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

I think we should go ahead and put here the expected changes to activity runtime. Specifically I assume all workflow_-prefixed fields of Info will become optional. I would also recommend either a "kind" enumerate for activities, or add an is_standalone akin to is_local so users can know it's not the traditional activity.

Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,20 @@ def must_from_callable(fn: Callable) -> _Definition:
f"Activity {fn_name} missing attributes, was it decorated with @activity.defn?"
)

@classmethod
def get_name_and_result_type(
Copy link
Member

@cretz cretz Oct 13, 2025

Choose a reason for hiding this comment

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

If we're extracting this common logic out of workflow_instance.py, can we update workflow_instance.py use this too? Also, then can we get rid of must_from_callable and inline it into this method since it won't be called anywhere anymore?

cls, name_or_run_fn: Union[str, Callable[..., Any]]
) -> Tuple[str, Optional[Type]]:
if isinstance(name_or_run_fn, str):
return name_or_run_fn, None
elif callable(name_or_run_fn):
defn = cls.must_from_callable(name_or_run_fn)
if not defn.name:
raise ValueError(f"Activity {name_or_run_fn} definition has no name")
return defn.name, defn.ret_type
else:
raise TypeError("Activity must be a string or callable")

@staticmethod
def _apply_to_callable(
fn: Callable,
Expand Down
10 changes: 9 additions & 1 deletion temporalio/api/activity/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
from .message_pb2 import ActivityOptions
from .message_pb2 import (
ActivityExecutionInfo,
ActivityListInfo,
ActivityOptions,
OnConflictOptions,
)

__all__ = [
"ActivityExecutionInfo",
"ActivityListInfo",
"ActivityOptions",
"OnConflictOptions",
]
94 changes: 91 additions & 3 deletions temporalio/api/activity/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading