From 8beeaf1a73c6bd0bb2e43e4196a0b58a6de35805 Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Mon, 23 Oct 2023 14:54:12 -0500 Subject: [PATCH] CI fix --- .github/workflows/ci.yml | 6 ++++-- README.md | 3 +-- tests/test_client.py | 17 +++++++---------- tests/testing/test_workflow.py | 3 +-- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c74a791..13f7724e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,11 +44,13 @@ jobs: - if: ${{ !endsWith(matrix.os, '-arm') }} uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python }} + # Due to a yet-uninvestigated change in 3.11.6 that breaks the Rust + # linker, we are pinning 3.11 to 3.11.5 here + python-version: ${{ matrix.python == '3.11' && '3.11.5' || matrix.python }} - if: ${{ matrix.os == 'ubuntu-arm' }} uses: deadsnakes/action@v2.1.1 with: - python-version: ${{ matrix.python }} + python-version: ${{ matrix.python == '3.11' && '3.11.5' || matrix.python }} # Using fixed Poetry version until # https://github.com/python-poetry/poetry/issues/7611 and # https://github.com/python-poetry/poetry/pull/7694 are fixed diff --git a/README.md b/README.md index 600730b5..bc311e34 100644 --- a/README.md +++ b/README.md @@ -733,8 +733,7 @@ This internally downloads the Temporal time-skipping test server to a temporary then starts the test server which has special APIs for skipping time. **NOTE:** The time-skipping test environment does not work on ARM. The SDK will try to download the x64 binary on macOS -for use with the Intel emulator, but for Linux or Windows ARM there will be no proper time-skipping test server at this -time. +for use with the Intel emulator, but for Linux or Windows ARM there is no proper time-skipping test server at this time. ##### Automatic Time Skipping diff --git a/tests/test_client.py b/tests/test_client.py index 913f3aef..7ce9d307 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -910,10 +910,7 @@ async def test_schedule_backfill( pytest.skip("Java test server doesn't support schedules") await assert_no_schedules(client) - # Just in case it's on the minute boundary, move it off - now = datetime.utcnow() - if now.second == 0: - now += timedelta(seconds=1) + begin = datetime(year=2020, month=1, day=20, hour=5) # Create paused schedule that runs every minute and has two backfills handle = await client.create_schedule( @@ -934,8 +931,8 @@ async def test_schedule_backfill( ), backfill=[ ScheduleBackfill( - start_at=now - timedelta(minutes=30), - end_at=now - timedelta(minutes=29), + start_at=begin - timedelta(minutes=30), + end_at=begin - timedelta(minutes=29), overlap=ScheduleOverlapPolicy.ALLOW_ALL, ) ], @@ -945,13 +942,13 @@ async def test_schedule_backfill( # Add two more backfills and and -2m will be deduped await handle.backfill( ScheduleBackfill( - start_at=now - timedelta(minutes=4), - end_at=now - timedelta(minutes=2), + start_at=begin - timedelta(minutes=4), + end_at=begin - timedelta(minutes=2), overlap=ScheduleOverlapPolicy.ALLOW_ALL, ), ScheduleBackfill( - start_at=now - timedelta(minutes=2), - end_at=now, + start_at=begin - timedelta(minutes=2), + end_at=begin, overlap=ScheduleOverlapPolicy.ALLOW_ALL, ), ) diff --git a/tests/testing/test_workflow.py b/tests/testing/test_workflow.py index e0c1117b..22bdd818 100644 --- a/tests/testing/test_workflow.py +++ b/tests/testing/test_workflow.py @@ -132,8 +132,7 @@ async def test_workflow_env_time_skipping_heartbeat_timeout(): # Check the causes until heartbeat timeout assert isinstance(err.value.cause, ActivityError) assert isinstance(err.value.cause.cause, TimeoutError) - assert isinstance(err.value.cause.cause.cause, TimeoutError) - assert err.value.cause.cause.cause.type == TimeoutType.HEARTBEAT + assert err.value.cause.cause.type == TimeoutType.HEARTBEAT @workflow.defn