Skip to content

Commit 4242dfb

Browse files
authored
README updates and CI fixes (#403)
Fixes #59 Fixes #379
1 parent 00878ad commit 4242dfb

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
- if: ${{ !endsWith(matrix.os, '-arm') }}
4545
uses: actions/setup-python@v4
4646
with:
47-
python-version: ${{ matrix.python }}
47+
# Due to a yet-uninvestigated change in 3.11.6 that breaks the Rust
48+
# linker on Windows, we are pinning 3.11 to 3.11.5 here
49+
python-version: ${{ matrix.python == '3.11' && '3.11.5' || matrix.python }}
4850
- if: ${{ matrix.os == 'ubuntu-arm' }}
4951
uses: deadsnakes/[email protected]
5052
with:

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Some things to note about the above code:
282282
does the same thing
283283
* Clients can have many more options not shown here (e.g. data converters and interceptors)
284284
* A string can be used instead of the method reference to call a workflow by name (e.g. if defined in another language)
285-
* Clients to not work across forks
285+
* Clients do not work across forks
286286

287287
Clients also provide a shallow copy of their config for use in making slightly different clients backed by the same
288288
connection. For instance, given the `client` above, this is how to have a client in another namespace:
@@ -732,6 +732,9 @@ The time-skipping `temporalio.testing.WorkflowEnvironment` can be created via th
732732
This internally downloads the Temporal time-skipping test server to a temporary directory if it doesn't already exist,
733733
then starts the test server which has special APIs for skipping time.
734734

735+
**NOTE:** The time-skipping test environment does not work on ARM. The SDK will try to download the x64 binary on macOS
736+
for use with the Intel emulator, but for Linux or Windows ARM there is no proper time-skipping test server at this time.
737+
735738
##### Automatic Time Skipping
736739

737740
Anytime a workflow result is waited on, the time-skipping server automatically advances to the next event it can. To
@@ -1272,8 +1275,9 @@ Below are known compatibility issues with the Python SDK.
12721275
#### gevent Patching
12731276

12741277
When using `gevent.monkey.patch_all()`, asyncio event loops can get messed up, especially those using custom event loops
1275-
like Temporal. See [this gevent issue](https://github.com/gevent/gevent/issues/982) and
1276-
[this Python SDK issue](https://github.com/temporalio/sdk-python/issues/59) for more details.
1278+
like Temporal. See [this gevent issue](https://github.com/gevent/gevent/issues/982). This is a known incompatibility and
1279+
users are encouraged to not use gevent in asyncio applications (including Temporal). But if you must, there is
1280+
[a sample](https://github.com/temporalio/samples-python/tree/main/gevent_async) showing how it is possible.
12771281

12781282
# Development
12791283

tests/test_client.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -910,10 +910,7 @@ async def test_schedule_backfill(
910910
pytest.skip("Java test server doesn't support schedules")
911911
await assert_no_schedules(client)
912912

913-
# Just in case it's on the minute boundary, move it off
914-
now = datetime.utcnow()
915-
if now.second == 0:
916-
now += timedelta(seconds=1)
913+
begin = datetime(year=2020, month=1, day=20, hour=5)
917914

918915
# Create paused schedule that runs every minute and has two backfills
919916
handle = await client.create_schedule(
@@ -934,8 +931,8 @@ async def test_schedule_backfill(
934931
),
935932
backfill=[
936933
ScheduleBackfill(
937-
start_at=now - timedelta(minutes=30),
938-
end_at=now - timedelta(minutes=29),
934+
start_at=begin - timedelta(minutes=30),
935+
end_at=begin - timedelta(minutes=29),
939936
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
940937
)
941938
],
@@ -945,13 +942,13 @@ async def test_schedule_backfill(
945942
# Add two more backfills and and -2m will be deduped
946943
await handle.backfill(
947944
ScheduleBackfill(
948-
start_at=now - timedelta(minutes=4),
949-
end_at=now - timedelta(minutes=2),
945+
start_at=begin - timedelta(minutes=4),
946+
end_at=begin - timedelta(minutes=2),
950947
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
951948
),
952949
ScheduleBackfill(
953-
start_at=now - timedelta(minutes=2),
954-
end_at=now,
950+
start_at=begin - timedelta(minutes=2),
951+
end_at=begin,
955952
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
956953
),
957954
)

tests/testing/test_workflow.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ async def test_workflow_env_time_skipping_heartbeat_timeout():
132132
# Check the causes until heartbeat timeout
133133
assert isinstance(err.value.cause, ActivityError)
134134
assert isinstance(err.value.cause.cause, TimeoutError)
135-
assert isinstance(err.value.cause.cause.cause, TimeoutError)
136-
assert err.value.cause.cause.cause.type == TimeoutType.HEARTBEAT
135+
assert err.value.cause.cause.type == TimeoutType.HEARTBEAT
137136

138137

139138
@workflow.defn

0 commit comments

Comments
 (0)