Skip to content

Commit 30e68d0

Browse files
committed
Merge branch 'main' into remove-update-experimental-notices
2 parents e06088f + 1a68b58 commit 30e68d0

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ jobs:
5353
- run: poe lint
5454
- run: poe build-develop
5555
- run: mkdir junit-xml
56-
- run: poe test -s -o log_cli_level=WARN --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
56+
- run: poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
5757
# Time skipping doesn't yet support ARM
5858
- if: ${{ !endsWith(matrix.os, '-arm') }}
59-
run: poe test -s -o log_cli_level=WARN --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
59+
run: poe test -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
6060
# Check cloud if proper target and not on fork
6161
- if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }}
62-
run: poe test -s -o log_cli_level=WARN -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml
62+
run: poe test -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml
6363
env:
6464
TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
6565
TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00
@@ -87,7 +87,7 @@ jobs:
8787
poe gen-protos
8888
poe format
8989
[[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1)
90-
poe test -s -o log_cli_level=WARN
90+
poe test -s
9191
9292
# Do docs stuff (only on one host)
9393
- name: Build API docs

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ cmd = "pip uninstall temporalio -y"
105105

106106
[tool.pytest.ini_options]
107107
asyncio_mode = "auto"
108-
log_cli = true
109-
log_cli_level = "WARN"
110-
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
108+
# Do not use log_cli since this shows logging for all tests, not just the ones
109+
# that failed. Instead, show all logs for failed tests at the end.
110+
log_level = "DEBUG"
111+
log_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
111112
testpaths = ["tests"]
112113
timeout = 600
113114
timeout_func_only = true

tests/worker/test_workflow.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5502,12 +5502,11 @@ async def _get_workflow_result(
55025502
await handle.signal(handler_name)
55035503
else:
55045504
if not wait_all_handlers_finished:
5505-
with pytest.raises(RPCError) as err:
5505+
with pytest.raises(WorkflowUpdateFailedError) as err_info:
55065506
await handle.execute_update(handler_name, id="my-update")
5507-
assert (
5508-
err.value.status == RPCStatusCode.NOT_FOUND
5509-
and "workflow execution already completed" in str(err.value).lower()
5510-
)
5507+
update_err = err_info.value
5508+
assert isinstance(update_err.cause, ApplicationError)
5509+
assert update_err.cause.type == "AcceptedUpdateCompletedWorkflow"
55115510
else:
55125511
await handle.execute_update(handler_name, id="my-update")
55135512

@@ -5736,11 +5735,12 @@ async def _run_workflow_and_get_warning(self) -> bool:
57365735
if self.handler_waiting == "-wait-all-handlers-finish-":
57375736
await update_task
57385737
else:
5739-
with pytest.raises(RPCError) as update_err:
5738+
with pytest.raises(WorkflowUpdateFailedError) as err_info:
57405739
await update_task
5741-
assert update_err.value.status == RPCStatusCode.NOT_FOUND and (
5742-
str(update_err.value).lower()
5743-
== "workflow execution already completed"
5740+
update_err = err_info.value
5741+
assert isinstance(update_err.cause, ApplicationError)
5742+
assert (
5743+
update_err.cause.type == "AcceptedUpdateCompletedWorkflow"
57445744
)
57455745

57465746
with pytest.raises(WorkflowFailureError) as err:

0 commit comments

Comments
 (0)