From 386750798fc85a8f31e2890d4ec6c2a0a36f49d8 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 20 Aug 2024 11:45:17 -0400 Subject: [PATCH 1/3] Create and upload junit-xml artifacts --- .github/workflows/ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e3390cd..3df0dd15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,17 +59,25 @@ jobs: - run: poetry install --no-root --all-extras - run: poe lint - run: poe build-develop - - run: poe test -s -o log_cli_level=DEBUG + - run: mkdir junit-xml + - run: poe test -s -o log_cli_level=DEBUG --junit-xml=junit-xml/${{ matrix.python }}-${{ matrix.os }}.xml # Time skipping doesn't yet support ARM - if: ${{ !endsWith(matrix.os, '-arm') }} - run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping + run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}-${{ matrix.os }}-time-skipping.xml # Check cloud if proper target and not on fork - if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} - run: poe test -s -o log_cli_level=DEBUG -k test_cloud_client + run: poe test -s -o log_cli_level=DEBUG -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}-${{ matrix.os }}-cloud.xml env: TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00 TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6 + - name: "Upload junit-xml artifacts" + uses: actions/upload-artifact@v4 + if: always() + with: + name: junit-xml + path: junit-xml + retention-days: 30 # Confirm protos are already generated properly with older protobuf # library and run test with that older version. We must downgrade protobuf From fa27ce29e52c23802c7d43845fb78ef6077b9598 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 20 Aug 2024 12:21:07 -0400 Subject: [PATCH 2/3] Use distinct name for upload --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3df0dd15..527a5812 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: junit-xml + name: junit-xml-${{ matrix.python }}-${{ matrix.os }} path: junit-xml retention-days: 30 From bb54ca26fd42b0e0cbf9cc745c4e2ff7c574cc4f Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 20 Aug 2024 11:21:50 -0400 Subject: [PATCH 3/3] Fix incorrect signatures of late-registered handlers --- tests/worker/test_workflow.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index d922bafa..930f23ac 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -5426,26 +5426,22 @@ async def run( if handler_registration == "-late-registered-": if handler_dynamism == "-dynamic-": - async def my_late_registered_dynamic_update( - self, name: str, args: Sequence[RawValue] - ) -> str: + async def my_late_registered_dynamic_update(*args, **kwargs) -> str: await workflow.wait_condition(lambda: self.handlers_may_finish) return "my-late-registered-dynamic-update-result" - async def my_late_registered_dynamic_signal( - self, name: str, args: Sequence[RawValue] - ) -> None: + async def my_late_registered_dynamic_signal(*args, **kwargs) -> None: await workflow.wait_condition(lambda: self.handlers_may_finish) workflow.set_dynamic_update_handler(my_late_registered_dynamic_update) workflow.set_dynamic_signal_handler(my_late_registered_dynamic_signal) else: - async def my_late_registered_update(self) -> str: + async def my_late_registered_update() -> str: await workflow.wait_condition(lambda: self.handlers_may_finish) return "my-late-registered-update-result" - async def my_late_registered_signal(self) -> None: + async def my_late_registered_signal() -> None: await workflow.wait_condition(lambda: self.handlers_may_finish) workflow.set_update_handler(