diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b079e60b..21e498132 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - "releases/*" jobs: + + nightly: + uses: ./.github/workflows/run-bench.yml + # Build and test the project build-lint-test: strategy: diff --git a/.github/workflows/run-bench.yml b/.github/workflows/run-bench.yml index 6dcad63e8..0cecd6166 100644 --- a/.github/workflows/run-bench.yml +++ b/.github/workflows/run-bench.yml @@ -55,17 +55,3 @@ jobs: - run: poe run-bench --workflow-count 100 --max-cached-workflows 100 --max-concurrent 100 ${{ inputs.sandbox-arg }} - run: poe run-bench --workflow-count 100 --max-cached-workflows 100 --max-concurrent 100 ${{ inputs.sandbox-arg }} - run: poe run-bench --workflow-count 100 --max-cached-workflows 100 --max-concurrent 100 ${{ inputs.sandbox-arg }} - - - run: poe run-bench --workflow-count 1000 --max-cached-workflows 1000 --max-concurrent 1000 ${{ inputs.sandbox-arg }} - - run: poe run-bench --workflow-count 1000 --max-cached-workflows 1000 --max-concurrent 1000 ${{ inputs.sandbox-arg }} - - run: poe run-bench --workflow-count 1000 --max-cached-workflows 1000 --max-concurrent 1000 ${{ inputs.sandbox-arg }} - - - run: poe run-bench --workflow-count 1000 --max-cached-workflows 100 --max-concurrent 100 ${{ inputs.sandbox-arg }} - - run: poe run-bench --workflow-count 1000 --max-cached-workflows 100 --max-concurrent 100 ${{ inputs.sandbox-arg }} - - run: poe run-bench --workflow-count 1000 --max-cached-workflows 100 --max-concurrent 100 ${{ inputs.sandbox-arg }} - - - run: poe run-bench --workflow-count 10000 --max-cached-workflows 10000 --max-concurrent 10000 ${{ inputs.sandbox-arg }} - - run: poe run-bench --workflow-count 10000 --max-cached-workflows 10000 --max-concurrent 10000 ${{ inputs.sandbox-arg }} - - - run: poe run-bench --workflow-count 10000 --max-cached-workflows 1000 --max-concurrent 1000 ${{ inputs.sandbox-arg }} - - run: poe run-bench --workflow-count 10000 --max-cached-workflows 1000 --max-concurrent 1000 ${{ inputs.sandbox-arg }} \ No newline at end of file diff --git a/scripts/run_bench.py b/scripts/run_bench.py index decbe4810..9cd4080c9 100644 --- a/scripts/run_bench.py +++ b/scripts/run_bench.py @@ -31,6 +31,15 @@ async def bench_activity(name: str) -> str: return f"Hello, {name}!" +@workflow.defn +class DeadlockInterruptibleWorkflow: + @workflow.run + async def run(self) -> None: + # Infinite loop, which is interruptible via PyThreadState_SetAsyncExc + while True: + pass + + async def main(): logging.basicConfig( format="%(asctime)s.%(msecs)03d %(levelname)-8s %(message)s", @@ -86,6 +95,13 @@ async def report_mem(): logger.debug("Starting %s workflows", args.workflow_count) pre_start_seconds = time.monotonic() handles = [ + await env.client.start_workflow( + DeadlockInterruptibleWorkflow.run, + id=f"deadlock-interruptible-workflow-{i}-{uuid.uuid4()}", + task_queue=task_queue, + ) + for i in range(1) + ] + [ await env.client.start_workflow( BenchWorkflow.run, f"user-{i}", @@ -101,7 +117,7 @@ async def report_mem(): async with Worker( env.client, task_queue=task_queue, - workflows=[BenchWorkflow], + workflows=[BenchWorkflow, DeadlockInterruptibleWorkflow], activities=[bench_activity], workflow_runner=SandboxedWorkflowRunner() if args.sandbox