Closed LesnyRumcajs closed 1 month ago
The reason for the above is that we are using ManyCar::open
for the validate
command, which is loading all the files as a union.
Perhaps it's best to convert this command to something that either:
union
argument for union validation.Having a separate command for union
would probably be more obvious, even if it points
to the same code under the hood, just a different branch of it.
Solution: Rename the validate
command to validate-diffs
and add a new validate
command that checks each file separately.
Describe the bug
The
forest-tool snapshot validate [FILES]...
does not seem to validate the snapshots independently. It may be by design, but it's a pretty unexpected behaviour and should be either mitigated functionally (by validating each snapshot independently and failing the command if one of them is corrupted) or by having a separate subcommand for validating a union of snapshots.To Reproduce Steps to reproduce the behavior:
forest-tool snapshot validate --check-network calibnet forest_snapshot_calibnet_2023-08-21_height_842289.forest.car.zst
. You should see:Expected behaviour
This
snapshot validate <multiple files>...
should fail if any file is corrupt. If we want to validate a union, there should be a separate subcommand, e.g.,snapshot validate-union
.Screenshots
Environment (please complete the following information):
Other information and links This was first encountered in https://github.com/ChainSafe/forest-iac/pull/224.