Skip to content

1.3.0

Compare
Choose a tag to compare
@cretz cretz released this 24 Jul 17:42
· 105 commits to main since this release
3fec58f

Get from PyPI

Highlights

Dynamic Workflows, Activities, Signals, and Queries

dynamic=True can be added to @workflow.defn, @activity.defn, @workflow.signal, and @workflow.query to make them "dynamic". This means they are unnamed and are called if no other workflow/activity/signal/query match a name from the server when called. The workflow run or activity signature must be a single parameter typed with Sequence[temporalio.common.RawValue] whereas the signal or query signature must be two parameters typed with str and Sequence[temporalio.common.RawValue]. Signals and queries that used the old form of dynamic=True which didn't require specific signatures are deprecated and will emit a warning.

To support this we added workflow.payload_converter() and activity.payload_converter() functions to obtain a payload converter to convert raw values. We also added a temporalio.common.RawValue class which, when accepted or returned, will just use the raw payload (but it will still use codecs).

See the README for more information.

💥 NOTE: A slight behavior change was made to interceptors to support this. Previously, we would call signal/query interceptor and then check if there was a valid signal/query with that name. Now we check that a valid signal/query handler exists before calling the interceptor. This should not effect most users.

Use Latest Temporal CLI Dev Server Instead of Temporalite

temporalio.testing.WorkflowEnvironment.start_local now uses the latest Temporal CLI release (which is up to date with latest server) instead of Temporalite. Any use of advanced, documented-experimental temporalite_-prefixed parameters should now use the dev_server_-prefixed ones.

Experimental Worker Versioning Support

Support has been added for the brand new Worker Versioning feature. This feature is currently experimental and can only be enabled when running the open source server and setting some special options. Samples for the versioning feature will be present soon.

Schedules GA

The experimental tag for the scheduling API is removed.

General Improvements

  • Can now set result_type when not using type-safe activity, child workflow, and query calls to get properly typed results (but users should always prefer the type-safe forms)
  • We now eagerly error if an invalid workflow call is attempted inside a query. In some cases this may have technically worked before but is invalid and will now properly error.

Specific Changes

2023-05-31 - b0daaa3 - Create CODEOWNERS (#323)
2023-06-06 - e1d983e - Add Semgrep scanning (#324)
2023-06-16 - 6a3662c - Remove experimental tag for schedules and add limited action check (#330)
2023-07-05 - 07b2043 - Update core and update Rust dependencies (#337)
2023-07-05 - b75a567 - Allow converter failures to fail workflow and other minor things (#329)
2023-07-06 - aff198b - Set result types for string-based activity, child workflow, and query calls (#334)
2023-07-07 - 677f8be - Move from Temporalite to Temporal CLI dev server (#339)
2023-07-10 - d7238cd - Worker Versioning (#340)
2023-07-11 - 317dd9b - Add Versioning Intents to Commands (#342)
2023-07-11 - b902ec8 - Swallow Python exceptions better on workflow GC from eviction (#341)
2023-07-12 - 34681ca - Reachability type wasn't passed through all the way (#343)
2023-07-14 - 83bbc36 - Dynamic workflows, activities, signals, and queries (#346)
2023-07-17 - 60b72c6 - Link to Python SDK launch blog post (#350)
2023-07-18 - a17c0ef - Disallow most workflow operations in read-only context (#351)
2023-07-18 - b9df212 - Log and drop signals whose params can't be deserialized (and other error handling improvements) (#349)