Skip to content
Merged
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dev = [
"pydocstyle>=6.3.0,<7",
"pydoctor>=25.10.1,<26",
"pyright==1.1.403",
"pytest~=7.4",
"pytest~=9.0",
"pytest-asyncio>=0.21,<0.22",
"pytest-timeout~=2.2",
"ruff>=0.5.0,<0.6",
Expand All @@ -81,7 +81,7 @@ dev = [
"pytest-xdist>=3.6,<4",
"moto[s3,server]>=5",
"langgraph>=1.1.0",
"langsmith>=0.7.0,<0.8",
"langsmith>=0.7.0,<0.7.34",
"setuptools<82",
"opentelemetry-exporter-otlp-proto-grpc>=1.11.1,<2",
"opentelemetry-semantic-conventions>=0.40b0,<1",
Expand Down
4 changes: 2 additions & 2 deletions temporalio/bridge/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 21 additions & 24 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,30 +1136,27 @@ async def test_schedule_backfill(
)
],
)
# We accept both 1.24 and pre-1.24 action counts
assert (await handle.describe()).info.num_actions in [1, 2]

# Add two more backfills and and -2m will be deduped
await handle.backfill(
# 3 actions on Server >= 1.24, 2 actions on Server < 1.24
ScheduleBackfill(
start_at=begin - timedelta(minutes=4),
end_at=begin - timedelta(minutes=2),
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
),
# 3 actions on Server >= 1.24, 2 actions on Server < 1.24, except on
# Server >= 1.24, there is overlap with the prior backfill, so this is
# only net +2 actions, regardless of Server version.
ScheduleBackfill(
start_at=begin - timedelta(minutes=2),
end_at=begin,
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
),
)
assert (await handle.describe()).info.num_actions in [5, 7]

await handle.delete()
await assert_no_schedules(client)
try:
# Add two more backfills. Older servers treat the end time as
# exclusive, 1.24+ servers treat it as inclusive, and 1.31+ servers no
# longer dedupe the overlapping ALLOW_ALL backfills below.
await handle.backfill(
# 3 actions on Server >= 1.24, 2 actions on Server < 1.24
ScheduleBackfill(
start_at=begin - timedelta(minutes=4),
end_at=begin - timedelta(minutes=2),
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
),
# 3 actions on Server >= 1.24, 2 actions on Server < 1.24.
ScheduleBackfill(
start_at=begin - timedelta(minutes=2),
end_at=begin,
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
),
)
finally:
await handle.delete()
await assert_no_schedules(client)


async def test_schedule_create_limited_actions_validation(
Expand Down
4 changes: 3 additions & 1 deletion tests/worker/workflow_sandbox/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys
import time
import uuid
import warnings
from collections.abc import Callable, Sequence
from dataclasses import dataclass
from datetime import date, datetime, timedelta
Expand Down Expand Up @@ -645,7 +646,8 @@ async def test_workflow_sandbox_import_suppress_warnings(client: Client):
workflows=[SupressWarningsLazyImportWorkflow],
workflow_runner=SandboxedWorkflowRunner(restrictions),
) as worker:
with pytest.warns(None) as recorder: # type:ignore
with warnings.catch_warnings(record=True) as recorder:
warnings.simplefilter("always")
await client.execute_workflow(
SupressWarningsLazyImportWorkflow.run,
id=f"workflow-{uuid.uuid4()}",
Expand Down
Loading
Loading