node: validate production in debug mode
Ensure that the production repository is validated after fetching and performing deletions. This is to highlight any inconsistencies that may show up between fetching and deleting references. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
parent
024218014b
commit
3bfea69642
|
|
@ -398,6 +398,16 @@ impl<'a> StagingPhaseFinal<'a> {
|
||||||
let head = production.set_identity_head()?;
|
let head = production.set_identity_head()?;
|
||||||
log::debug!(target: "worker", "'refs/rad/id' for {} set to {head}", production.id);
|
log::debug!(target: "worker", "'refs/rad/id' for {} set to {head}", production.id);
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
// N.b. This is to prevent us from shooting ourselves in the
|
||||||
|
// foot with storage inconsistencies.
|
||||||
|
radicle::debug_assert_matches!(
|
||||||
|
production.validate(),
|
||||||
|
Ok(()),
|
||||||
|
"repository {} is not valid",
|
||||||
|
production.id,
|
||||||
|
);
|
||||||
|
|
||||||
Ok((updates, remotes))
|
Ok((updates, remotes))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue