Skip to content

Add Prefect worker example - #16

Open
opencolin wants to merge 1 commit into
mainfrom
examples/prefect-tenki
Open

Add Prefect worker example#16
opencolin wants to merge 1 commit into
mainfrom
examples/prefect-tenki

Conversation

@opencolin

@opencolin opencolin commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Adds examples/prefect-tenki: the prefect-tenki worker runs each Prefect 3.x flow run in its own microVM (prefect work-pool create --type tenki). Not on PyPI yet, so requirements pin a git SHA.

A real flow run isn't CI-feasible — the guest has to reach a Prefect API, and a localhost server is unreachable from the microVM — so verify.py mirrors upstream's own smoke test: TenkiWorker.run() end-to-end against live Tenki with no server, asserting exit 0 and teardown. Passed live. The README is explicit about what a real deployment needs (a Prefect-equipped image with outbound access).

Root README: Prefect row in Developer tools.

🤖 Generated with Claude Code

Shows Prefect 3.x flow runs executing in per-run Tenki microVMs via the
prefect-tenki worker (installed from git at a pinned commit; not on PyPI yet).
verify.py drives TenkiWorker.run() directly against live Tenki — mirroring
upstream's live_worker_smoke.py — since a localhost Prefect server is
unreachable from inside the guest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tenki-reviewer

tenki-reviewer Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR introduces a new example directory that demonstrates running Prefect workers inside Tenki microVMs. It is additive example content with no production-code changes. The Python script parses config lines, resolves the workspace, and exits non-zero on any failure; the Node shim proxies child exit status. No correctness, concurrency, security, or performance defects were found that meet the review confidence bar.

Files Change
examples/prefect-tenki/requirements.txt Pins tenki and prefect (git commit) for the example environment.
examples/prefect-tenki/verify.py Parses worker config, resolves workspace, runs verification, exits 1 on failure.
examples/prefect-tenki/verify.mjs Spawns the Python verify script and propagates its exit status.
README.md, examples/prefect-tenki/README.md Document the example's setup, verification flow, and usage.

Reviewed commit: 552ea0c

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