[PP-1] After applying a recipe, it should be possible to remove the backup checkpoint

Created on 25 January 2024, about 1 year ago

Problem/Motivation

#3407956: Create a config storage checkpoint before applying a recipe, and clean it up afterwards β†’ made RecipeCommand create a checkpoint before the recipe is applied, for backup purposes. Once the recipe successfully applies, the checkpoint probably isn't needed anymore, but it's kept anyway.

That's not a big deal from a safety perspective, but if you apply a lot of recipes, it will eventually make a mess of old, defunct checkpoints that you don't need. So I'd say this is needed in order for recipes to be usable in the wild.

Proposed resolution

Add a --no-keep-checkpoint option to RecipeCommand which will delete the backup checkpoint once the recipe has been successfully applied. If the recipe fails to apply (throws an exception), the backup checkpoint should remain.

Remaining tasks

This is hard-blocked by #3409718: Add CheckpointListInterface::merge() or ::squash() to allow NOT keeping a checkpoint after application β†’ , which will fix a bug wherein deleting a checkpoint deletes all the checkpoints before it.

Once that's done, it should be reasonably straightforward to implement this with tests.

✨ Feature request
Status

Postponed

Version

11.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024