Guard cellular profile migration recovery
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m53s
Foundation / checks (client) (push) Successful in 13m29s
Foundation / checks (network) (push) Successful in 14m48s
Foundation / checks (tsan) (push) Successful in 8m19s
Foundation / checks (postgres) (push) Failing after 20m2s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 34m44s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m53s
Foundation / checks (client) (push) Successful in 13m29s
Foundation / checks (network) (push) Successful in 14m48s
Foundation / checks (tsan) (push) Successful in 8m19s
Foundation / checks (postgres) (push) Failing after 20m2s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 34m44s
This commit is contained in:
@@ -6913,3 +6913,10 @@ access at `src/persistence/cellular_checkpoint_store.cpp:550`: the stored action
|
||||
block inside the successful database result. Recovery now validates that the
|
||||
block is present and decodes a `value_or` copy. The PostgreSQL job failed on this
|
||||
diagnostic, so this run also did not start server-image or Harbor publication.
|
||||
|
||||
CI run #290 confirmed both action-record repairs and found a third nested optional
|
||||
access in the cellular profile-migration recovery check at
|
||||
`src/persistence/cellular_checkpoint_store.cpp:464`. Recovery now copies the
|
||||
optional migration record through `value_or` and validates the copy after
|
||||
preserving the missing-record history failure. PostgreSQL failed on this
|
||||
diagnostic, so the image and Harbor jobs remained blocked.
|
||||
|
||||
@@ -428,11 +428,12 @@ recover_cellular_checkpoint(Postgres& db, const FilesystemObjectStore& objects,
|
||||
auto migration = load_cellular_profile_migration(db, key, lease, manifest->commit, timeout);
|
||||
if (!migration)
|
||||
return std::unexpected{RecoveryFailure{RecoveryError::store, migration.error()}};
|
||||
if (!*migration || (*migration)->target_sequence != manifest->sequence ||
|
||||
(*migration)->target_commit != manifest->commit ||
|
||||
(*migration)->target_manifest_sha256 != *digest ||
|
||||
(*migration)->target_payload_sha256 != manifest->payload_sha256 ||
|
||||
(*migration)->target_sequence == 0)
|
||||
const auto migration_record = migration->value_or(CellularProfileMigrationRecord{});
|
||||
if (!*migration || migration_record.target_sequence != manifest->sequence ||
|
||||
migration_record.target_commit != manifest->commit ||
|
||||
migration_record.target_manifest_sha256 != *digest ||
|
||||
migration_record.target_payload_sha256 != manifest->payload_sha256 ||
|
||||
migration_record.target_sequence == 0)
|
||||
return fail_with(RecoveryError::history);
|
||||
auto predecessor = load_region_commit(db, key, manifest->sequence - 1, timeout);
|
||||
if (!predecessor)
|
||||
@@ -453,15 +454,15 @@ recover_cellular_checkpoint(Postgres& db, const FilesystemObjectStore& objects,
|
||||
((source_manifest->cellular_versions == cellular_v1_versions) !=
|
||||
(manifest->cellular_versions == cellular_v2_versions)) ||
|
||||
source_manifest->end_tick != manifest->end_tick ||
|
||||
(*migration)->source_sequence != source_manifest->sequence ||
|
||||
(*migration)->source_commit != source_manifest->commit ||
|
||||
(*migration)->source_manifest_sha256 != *source_manifest_digest ||
|
||||
(*migration)->source_payload_sha256 != source_manifest->payload_sha256 ||
|
||||
(*migration)->source_versions.size() != 36 ||
|
||||
!std::ranges::equal((*migration)->source_versions,
|
||||
migration_record.source_sequence != source_manifest->sequence ||
|
||||
migration_record.source_commit != source_manifest->commit ||
|
||||
migration_record.source_manifest_sha256 != *source_manifest_digest ||
|
||||
migration_record.source_payload_sha256 != source_manifest->payload_sha256 ||
|
||||
migration_record.source_versions.size() != 36 ||
|
||||
!std::ranges::equal(migration_record.source_versions,
|
||||
std::span{*source_manifest_bytes}.subspan(160, 36)) ||
|
||||
(*migration)->target_versions.size() != 36 ||
|
||||
!std::ranges::equal((*migration)->target_versions,
|
||||
migration_record.target_versions.size() != 36 ||
|
||||
!std::ranges::equal(migration_record.target_versions,
|
||||
std::span{*target_manifest_bytes}.subspan(160, 36)))
|
||||
return fail_with(RecoveryError::history);
|
||||
auto source_bytes =
|
||||
|
||||
Reference in New Issue
Block a user