The recurring, reusable facts for deploying the Arrow Flight streaming feature to dev for the mando BESS platform — the three artifacts that must move together, the IaC location, the harmless-red CI step, the runtime switch, and where to verify. Distilled from a multi-session deploy.
For Agents — what moves together
A Flight deploy is three artifacts: (1) the mando server image, (2) the py-mando wheel, (3) the consumer images (optimization + forecast, both rebuilt on the matching wheel). When a wire type changes, all three must come from the same build — see be-1595-flight-wire-type-version-skew-2026-06-24. The consumer wheel-lock mechanics are in be-1595-arrow-consumer-lock-script-2026-06-24.
Migration drift → mando crash-loop
"V…__… is missing from the filesystem" = migration drift
mando crash-loops when the DB has migrations the branch’s source tree doesn’t (Flyway-style: a version applied to the DB has no matching file on the branch). Symptom in logs:
V…__… is missing from the filesystem.Fix: merge
developinto the deploy branch so the branch’s migration set ⊇ the DB’s. This is routine on long-livedfeature/*arrow*branches that drift behinddevelop.
IaC location and image pins
The infrastructure lives in optimization-universe-iac:
- Worktree:
.worktrees/mando-arrow - Terraform var file:
terraform.auto.tfvars.json— holds the image pins for mando, optimization-algo, and forecast-algo.
To bump the deployed images, edit the three pins in terraform.auto.tfvars.json (in the mando-arrow worktree) and apply.
terraform_apply:devalways goes red on a customer-portal S3 403 — harmlessThe
terraform_apply:devCI step always shows red because of a pre-existing customer-portal S3 403 (HeadObject) that is not ours. Terraform still printsApply complete!— the red is cosmetic, not a failed apply. Do NOT chase it; confirmApply complete!in the log and move on.
Runtime switch (algo task defs)
Flip the consumers onto Flight via env on the algo task defs:
| Var | Value | Default |
|---|---|---|
MANDO_FETCH_STRATEGY | flight | rest |
MANDO_FLIGHT_HOST | (mando host — localhost when co-located) | |
MANDO_FLIGHT_PORT | (Flight gRPC port, 50051) |
See be-1595-enabling-arrow-flight-consumers-2026-06-16 for the full per-service topology (co-located vs separate task) and the silent-REST-fallback gotcha.
Verify in Datadog
Datadog EU, env:dev. Services:
bess-os-service-mandobess-os-algo-optimizationbess-os-algo-forecast
What "working" looks like in the logs
- optimization on Flight: clean, fully on the Flight path (cache-window fetches only).
- forecast on Flight: emits
falling back to REST(gRPC Unimplemented) for the historical portion, then completes — this is the expected graceful degradation, not a failure. See be-1595-flight-rest-graceful-degradation-2026-06-24.- Remember: a “clean” run with NO logs proves nothing — a Flight misconfig silently falls back to REST on transport errors (
polars.rs:234). Confirm the Flight path is actually exercised.
Deploy checklist
For Agents — dev deploy order
- Merge
developinto the deploy branch (avoid migration drift crash-loop).- Build the three artifacts from the same build if any wire type changed (mando image + py-mando wheel + consumer images).
- Lock the consumers to the matching wheel (be-1595-arrow-consumer-lock-script-2026-06-24) — re-copy the one-liner fresh, verify the echoed wheel.
- Bump the three image pins in
optimization-universe-iac/.worktrees/mando-arrowterraform.auto.tfvars.json; apply (ignore the harmless S3-403 red; confirmApply complete!).- Set
MANDO_FETCH_STRATEGY=flight+MANDO_FLIGHT_HOST/PORTon the algo task defs.- Verify in Datadog EU
env:dev(mando / optimization / forecast). Expect forecastfalling back to REST, optimization fully on Flight.
Related
- be-1595-flight-rest-graceful-degradation-2026-06-24 — why forecast logs
falling back to REST - be-1595-flight-wire-type-version-skew-2026-06-24 — the same-build constraint
- be-1595-arrow-consumer-lock-script-2026-06-24 — locking consumers to the wheel
- be-1595-enabling-arrow-flight-consumers-2026-06-16 — runtime switch + per-service topology
- be-1595-publish-docker-dev-feature-branch-test-need-2026-06-16 — CI gotcha for feature-branch dev images
- Mando CI-CD
- py-mando
- Arrow Flight Streaming Design