Skip to content

[Ignore: not for merge] CI investigations #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions temporalio/worker/_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def __init__(
activity_task_poller_behavior: Specify the behavior of activity task polling.
Defaults to a 5-poller maximum.
"""
max_cached_workflows = 0
if not activities and not workflows:
raise ValueError("At least one activity or workflow must be specified")
if use_worker_versioning and not build_id:
Expand Down
29 changes: 0 additions & 29 deletions tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7022,35 +7022,6 @@ async def run(self) -> None:
deadlock_interruptible_completed += 1


async def test_workflow_deadlock_interruptible(client: Client):
# TODO(cretz): Improve this test and other deadlock/eviction tests by
# checking slot counts with Core. There are a couple of bugs where used slot
# counts are off by one and slots are released before eviction (see
# https://github.com/temporalio/sdk-core/issues/894).

# This worker used to not be able to shutdown because we hung evictions on
# deadlock
async with new_worker(client, DeadlockInterruptibleWorkflow) as worker:
# Start the workflow
assert deadlock_interruptible_completed == 0
handle = await client.start_workflow(
DeadlockInterruptibleWorkflow.run,
id=f"workflow-{uuid.uuid4()}",
task_queue=worker.task_queue,
)
# Wait for task fail
await assert_task_fail_eventually(handle, message_contains="deadlock")

# Confirm workflow was interrupted
async def check_completed():
assert deadlock_interruptible_completed >= 1

await assert_eventually(check_completed)
completed_sec = time.monotonic()
# Confirm worker shutdown didn't hang
assert time.monotonic() - completed_sec < 20


deadlock_uninterruptible_event = threading.Event()
deadlock_uninterruptible_completed = 0

Expand Down
Loading