Repository navigation
Name missing observations at migrate's verify steps instead of crashing (#183) - #184
Merged
Merged
Conversation
cloudfall migrate --yes that reached audit or verify-routes on a project with no server observations crashed with HANDLER_CRASHED: load_observations raises ConfigValidationError for a missing directory, and the step loop catches only MigrateError and LifecycleError. Both steps now check the observed directory first and raise migrate_observations_missing, naming the directory and cloudfall observe, so the plan is saved and a rerun after observe resumes at that step. A malformed snapshot and a server without a snapshot keep their current behaviour. Fixes #183 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also put the new test's pending list on one line, as ruff format wants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test used the old ConfigValidationError crash at the audit step as its stop; the run now returns an error envelope at audit instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shipmill-romamo
Bot
force-pushed
the
fix/183-migrate-observations-missing
branch
from
October 30, 2026 16:42
fb0f6d3 to
fd85d2b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cloudfall migrate --yesthat reached itsauditstep on a project with no server observations crashed withHANDLER_CRASHED:_verify_auditand_verify_routescallload_observations, which raisesConfigValidationError(observation_directory_missing) when the observed directory is absent, and the step loop catches onlyMigrateErrorandLifecycleError.Both steps now check the observed directory first (one helper) and raise
MigrateErrorcodemigrate_observations_missing, whose detail names the missing directory and the command that records observations (cloudfall observe). The run saves its plan and reports the step error like any other step error, so a rerun afterobserveresumes at that step. A malformed snapshot keeps its current behaviour, and an observed directory that exists but lacks a server's snapshot still reports drift (migrate_audit_drift).verify-routeschecks before it probes any domain.Plan
migrate --yesataudit(and atverify-routes) with no observed directory; then themigrate_observations_missingcheck in both verify steps; then the changelog fragmentHANDLER_CRASHEDand pass with the fix; ruff, mypy, sdk/tests/test_migrate.py and engine/tests passTest plan
uv run ruff check .uv run mypyuv run pytest sdk/tests/test_migrate.py: the newtest_cli_migrate_names_missing_observations_at_the_verify_step[audit|verify-routes]failed on main withHANDLER_CRASHEDand passes now. The CLI answersENGINE_STEP_FAILED(exit 87) withcontext.code = migrate_observations_missing, as every other step error does through_migration_failureuv run pytest engine/testsuv run pytest sdk/tests/test_owned_postgresql_converge.py:test_s006_6_migrate_records_the_hash_in_its_services_stepnow asserts the run stops atauditwithmigrate_observations_missinginstead of expectingConfigValidationErrorFixes #183
🤖 Generated with Claude Code