Skip to content

Commit fd49c4e

Browse files
authored
Worker Deployment Versioning (#821)
1 parent fb3dccd commit fd49c4e

27 files changed

+1130
-185
lines changed

.github/workflows/ci.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
python: ["3.9", "3.13"]
1616
os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
1717
include:
18+
# On 3.9 there is a problem with import errors caused by pytests' loader that surface due
19+
# to a bug in CPython, so we avoid using the assert rewriter.
20+
- python: "3.9"
21+
pytestExtraArgs: "--assert=plain"
1822
- os: ubuntu-latest
1923
python: "3.13"
2024
docsTarget: true
@@ -54,13 +58,13 @@ jobs:
5458
- run: poe lint
5559
- run: poe build-develop
5660
- run: mkdir junit-xml
57-
- run: poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
61+
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
5862
# Time skipping doesn't yet support ARM
5963
- if: ${{ !endsWith(matrix.os, '-arm') }}
60-
run: poe test -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
64+
run: poe test ${{matrix.pytestExtraArgs}} -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
6165
# Check cloud if proper target and not on fork
6266
- if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }}
63-
run: poe test -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml
67+
run: poe test ${{matrix.pytestExtraArgs}} -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml
6468
env:
6569
TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
6670
TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ class GreetingWorkflow:
510510
start_to_close_timeout=timedelta(seconds=5),
511511
)
512512
workflow.logger.debug("Greeting set to %s", self._current_greeting)
513-
513+
514514
# Wait for salutation update or complete signal (this can be
515515
# cancelled)
516516
await asyncio.wait(
@@ -536,7 +536,7 @@ class GreetingWorkflow:
536536
@workflow.query
537537
def current_greeting(self) -> str:
538538
return self._current_greeting
539-
539+
540540
@workflow.update
541541
def set_and_get_greeting(self, greeting: str) -> str:
542542
old = self._current_greeting
@@ -622,7 +622,7 @@ Here are the decorators that can be applied:
622622
* May mutate workflow state, and make calls to other workflow APIs like starting activities, etc.
623623
* Also accepts the `name` and `dynamic` parameters like signal, with the same semantics.
624624
* Update handlers may optionally define a validator method by decorating it with `@update_handler_method.validator`.
625-
To reject an update before any events are written to history, throw an exception in a validator. Validators cannot
625+
To reject an update before any events are written to history, throw an exception in a validator. Validators cannot
626626
be `async`, cannot mutate workflow state, and return nothing.
627627
* See [Signal and update handlers](#signal-and-update-handlers) below
628628
* `@workflow.query` - Defines a method as a query
@@ -994,7 +994,7 @@ To run an entire workflow outside of a sandbox, set `sandboxed=False` on the `@w
994994
it. This will run the entire workflow outside of the workflow which means it can share global state and other bad
995995
things.
996996

997-
To disable the sandbox entirely for a worker, set the `Worker` init's `workflow_runner` keyword argument to
997+
To disable the sandbox entirely for a worker, set the `Worker` init's `workflow_runner` keyword argument to
998998
`temporalio.worker.UnsandboxedWorkflowRunner()`. This value is defaulted to
999999
`temporalio.worker.workflow_sandbox.SandboxedWorkflowRunner()` so by changing it to the unsandboxed runner, the sandbox
10001000
will not be used at all.

temporalio/bridge/Cargo.lock

+55-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)