Replies: 1 comment
|
sounds great @BrenoLeal - i recommend creating your own |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Following Prefect's contribution guidelines for new integrations, I am opening this discussion early in the process so that the maintainers and community can review the use case, proposed architecture, initial scope, and repository strategy.
I am exploring a Prefect worker integration for Tenki in collaboration with the Tenki team. The goal is to allow Prefect flow runs to execute inside isolated, ephemeral Tenki sandboxes.
As part of this initial planning and prototyping phase, I would especially appreciate guidance on whether the integration should live in the Prefect monorepo or as a separately maintained
prefect-tenkipackage. The work is still at an early stage, and I am happy to adjust the design and contribution path based on feedback from this discussion.Motivation
Tenki provides on-demand Linux microVM sandboxes through a Python SDK. A Prefect integration would let users execute each flow run in a fresh remote environment without operating a persistent compute cluster.
The intended user experience is:
tenki.TenkiWorkeralongside Prefect.prefect flow-run execute, reports the result, and terminates the sandbox.Proposed components
TenkiCredentialsTenkiWorkerJobConfigurationTenkiWorkerVariablesTenkiWorkerResultTenkiWorker, registered with worker typetenkiThe initial configuration would expose CPU, memory, image or snapshot, outbound networking, command timeout, and a maximum sandbox duration.
Proposed lifecycle
For each flow run, the worker would:
prefect flow-run execute.finallypath.kill_infrastructure()so Prefect cancellation and timeout cleanup can terminate a sandbox by ID.The Tenki API credential would remain in the worker process and would not be passed into the sandbox environment. Prefect API settings required by the flow-run process would continue to be prepared through Prefect's normal job configuration lifecycle.
Initial scope
The proposed MVP would include:
Volumes, GPU support, inbound preview URLs, snapshot automation, and multi-sandbox workflows would be outside the first version.
Packaging and ownership
This work is being explored in collaboration with the Tenki team. If a standalone package is the preferred path, we will confirm the long-term ownership and responsibilities for maintenance, SDK compatibility, releases, documentation, security fixes, and support before publishing the first release.
I saw that the current contribution guidance generally recommends separate repositories for new integrations. I would appreciate guidance on the preferred path:
src/integrationsin the main repository?prefect-tenkipackage is preferred, is there a supported way to list or link an externally maintained worker from Prefect's integration or custom-worker documentation?prefect flow-run execute,BaseWorker.run(), andkill_infrastructure()the recommended extension points for this use case?Validation plan
Before submitting an implementation, we plan to validate:
I am happy to adjust the design and repository strategy as the work progresses. Would this integration be useful to the Prefect community, and which contribution path would the maintainers prefer?
All reactions