Skip to content

Commit 5d7af92

Browse files
committed
More precise logging
1 parent 7665bf5 commit 5d7af92

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
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=DEBUG --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=DEBUG --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=DEBUG -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=DEBUG
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 = "INFO"
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5840,7 +5840,7 @@ async def test_workflow_id_conflict(client: Client):
58405840

58415841

58425842
@workflow.defn
5843-
class TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1:
5843+
class UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow:
58445844
def __init__(self) -> None:
58455845
self.workflow_returned = False
58465846

@@ -5866,13 +5866,13 @@ async def test_update_completion_is_honored_when_after_workflow_return_1(
58665866
update_id = "my-update"
58675867
task_queue = "tq"
58685868
wf_handle = await client.start_workflow(
5869-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1.run,
5869+
UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow.run,
58705870
id=f"wf-{uuid.uuid4()}",
58715871
task_queue=task_queue,
58725872
)
58735873
update_result_task = asyncio.create_task(
58745874
wf_handle.execute_update(
5875-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1.my_update,
5875+
UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow.my_update,
58765876
id=update_id,
58775877
)
58785878
)
@@ -5881,7 +5881,7 @@ async def test_update_completion_is_honored_when_after_workflow_return_1(
58815881
async with Worker(
58825882
client,
58835883
task_queue=task_queue,
5884-
workflows=[TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1],
5884+
workflows=[UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow],
58855885
):
58865886
assert await wf_handle.result() == "workflow-result"
58875887
assert await update_result_task == "update-result"

0 commit comments

Comments
 (0)