Skip to content

chore: Added orchestrator tests#243

Draft
Volv-G wants to merge 2 commits into
masterfrom
volv/orchestrator-tests
Draft

chore: Added orchestrator tests#243
Volv-G wants to merge 2 commits into
masterfrom
volv/orchestrator-tests

Conversation

@Volv-G
Copy link
Copy Markdown
Collaborator

@Volv-G Volv-G commented May 20, 2026

TL;DR

Adds a comprehensive test suite for the SQL-backed orchestrator service.

What changed?

Introduced tests/test_orchestrator_sql.py with a full set of unit tests for OrchestratorService_Sql. The tests cover both the queued and running execution processing queues, including:

  • Launching executions with no inputs
  • Handling missing upstream inputs by transitioning to WAITING_FOR_UPSTREAM
  • Picking up UNINITIALIZED status executions
  • Respecting execution-level and pipeline-run-level TERMINATED desired state, cancelling the target and skipping downstream tasks
  • Cache hit behavior for both already-succeeded and still-running executions, including max_cache_staleness=P0D to disable reuse
  • Launcher exceptions resulting in SYSTEM_ERROR and downstream skips
  • Status polling transitions (pending → running → succeeded/failed)
  • Output collection on success and failure when outputs are missing from storage
  • Container termination when all execution nodes vote to terminate, and the partial-vote case where the container is left running
  • Refresh exceptions marking SYSTEM_ERROR and skipping downstream
  • Processing both queues in a single sweep via process_each_queue_once

Supporting infrastructure includes FakeLauncher, FakeLaunchedContainer, and FakeStorageProvider fakes, along with helper fixtures and utility functions for building pipeline graphs and driving executions to terminal states.

How to test?

Run the new test module directly:

pytest tests/test_orchestrator_sql.py

All tests use an in-memory SQLite database and fake implementations of the launcher and storage provider, so no external dependencies are required.

Why make this change?

The orchestrator is a critical component responsible for scheduling, caching, and lifecycle management of container executions. This test suite provides confidence that the core orchestration logic behaves correctly across a wide range of scenarios, including edge cases like partial termination votes, cache staleness policies, and error handling paths.

Copy link
Copy Markdown
Collaborator Author

Volv-G commented May 20, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Volv-G Volv-G force-pushed the volv/orchestrator-tests branch 2 times, most recently from 50f1f43 to b026f88 Compare May 20, 2026 20:12
Volv-G added 2 commits May 20, 2026 13:19
…wer window

The previous lockfile was missing the skypilot optional dependency group
(53 packages) and its exclude-newer timestamp had drifted outside the
rolling P7D window, both of which break uv sync --locked --all-extras
in CI.

Regenerated against public PyPI with UV_CONFIG_FILE=/dev/null to avoid
picking up the user-level extra-index-url pointing at Shopify's internal
mirror.
@Volv-G Volv-G changed the base branch from master to graphite-base/243 May 20, 2026 22:30
@Volv-G Volv-G force-pushed the volv/orchestrator-tests branch from b026f88 to 1b24674 Compare May 20, 2026 22:30
@Volv-G Volv-G changed the base branch from graphite-base/243 to volv/uv-lock-refresh May 20, 2026 22:30
@Volv-G Volv-G marked this pull request as ready for review May 20, 2026 22:59
@Volv-G Volv-G requested a review from Ark-kun as a code owner May 20, 2026 22:59
@Volv-G Volv-G marked this pull request as draft May 20, 2026 22:59
Base automatically changed from volv/uv-lock-refresh to master May 21, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant