Executor
Source:
apps/backend/kubernetes/executor/
Purpose
Section titled “Purpose”The executor runs workflows in an isolated environment (typically as a Kubernetes Job, optionally using a Kata RuntimeClass).
High-level steps:
- Load the target board definition from the metadata store (S3)
- Construct a
FlowLikeStatewith the content store - Execute the board using
flow_like::flow::execution::InternalRun
Entrypoint
Section titled “Entrypoint”apps/backend/kubernetes/executor/src/main.rs
Execution logic
Section titled “Execution logic”apps/backend/kubernetes/executor/src/execution.rs
Notable behaviors:
InternalRun::executetakesArc<FlowLikeState>and returnsOption<LogMeta>.- The executor currently does not treat
NonevsSome(_)as a hard failure; adjust this if you want job failure semantics.
Job input contract
Section titled “Job input contract”The executor expects a JSON payload describing what to run and which stores to use.
The precise env var names come from apps/backend/kubernetes/executor/src/main.rs and the JobInput struct there. If you change the job spec, keep this doc updated.
Typical fields:
app_idboard_idevent_id(optional)payload(JSON)- storage credentials/config:
endpointregionmeta_bucketcontent_bucket
Local debugging
Section titled “Local debugging”You can run the executor locally by setting the same environment variables your Job spec sets, then running:
cd apps/backend/kubernetes/executorcargo run