You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
migrate crashes at its audit step with HANDLER_CRASHED when no server observations exist #183
Found while building #165 (PR #182); not yet reproduced by triage.
The problem
A cloudfall migrate --yes that gets past its deploy step on a project with no server observations crashes at the audit step with HANDLER_CRASHED, instead of a clean error naming what's missing. The implementer saw it on main before their change too, and their tests read the saved plan file to work around it.
Expected
The audit step either runs without observations or stops with a typed error (PRECONDITION and a context code naming the missing observations, with the command that records them), never HANDLER_CRASHED.
Triage: implement. A bug fix (quality bar). Reproduced from the code on main (70a167f): the audit step's runner, _verify_audit in sdk/src/cloudfall/migrate.py, calls load_observations, which raises ConfigValidationError (observation_directory_missing) when the observed directory doesn't exist. The step loop in execute_migration only catches MigrateError and LifecycleError, so the error escapes as HANDLER_CRASHED. The routes step (_verify_routes) calls load_observations the same way and crashes the same way.
Plan: both steps stop with a typed error instead. Each raises MigrateError with a new code, migrate_observations_missing, whose detail names the missing directory and the command that records observations (cloudfall observe). The run saves its plan and reports the failing step as any other step error does, so a rerun after observe resumes at that step. An observed directory that exists but holds no snapshot for a declared server is left as it is: the audit reports it as drift (migrate_audit_drift), already a typed error. A regression test runs migrate --yes through the step with no observed directory and checks the code, and that the run isn't HANDLER_CRASHED.
PR: #184. audit and verify-routes now check for the observed directory first and fail with migrate_observations_missing, naming the directory and cloudfall observe; the plan is saved, so a rerun after observe resumes at that step. The CLI reports it as ENGINE_STEP_FAILED (exit 87), as it does every other migrate step error, rather than the PRECONDITION this issue suggested. A malformed snapshot and a server without one behave as before.
Released in v0.8.0rc13 (pre-release).
A plain install gets it with the next stable release.
If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.
Activity
shipmill-romamo commentedon Oct 30, 2026
Triage: implement. A bug fix (quality bar). Reproduced from the code on main (
70a167f): theauditstep's runner,_verify_auditinsdk/src/cloudfall/migrate.py, callsload_observations, which raisesConfigValidationError(observation_directory_missing) when the observed directory doesn't exist. The step loop inexecute_migrationonly catchesMigrateErrorandLifecycleError, so the error escapes asHANDLER_CRASHED. Theroutesstep (_verify_routes) callsload_observationsthe same way and crashes the same way.Plan: both steps stop with a typed error instead. Each raises
MigrateErrorwith a new code,migrate_observations_missing, whose detail names the missing directory and the command that records observations (cloudfall observe). The run saves its plan and reports the failing step as any other step error does, so a rerun afterobserveresumes at that step. An observed directory that exists but holds no snapshot for a declared server is left as it is: the audit reports it as drift (migrate_audit_drift), already a typed error. A regression test runsmigrate --yesthrough the step with no observed directory and checks the code, and that the run isn'tHANDLER_CRASHED.shipmill-romamo commentedon Oct 30, 2026
PR: #184.
auditandverify-routesnow check for the observed directory first and fail withmigrate_observations_missing, naming the directory andcloudfall observe; the plan is saved, so a rerun afterobserveresumes at that step. The CLI reports it asENGINE_STEP_FAILED(exit 87), as it does every other migrate step error, rather than thePRECONDITIONthis issue suggested. A malformed snapshot and a server without one behave as before.Name missing observations at migrate's verify steps instead of crashing
shipmill-romamo commentedon Oct 31, 2026
Released in v0.8.0rc13 (pre-release).
A plain install gets it with the next stable release.
If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.