Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupting a caching operation with a partial failure leaves the cache in an invalid state #267

Open
ethanjli opened this issue Jul 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ethanjli
Copy link
Member

ethanjli commented Jul 4, 2024

Currently, if we interrupt a forklift plt cache-repo operation while a required repo is in the middle of being cached, causing a partial failure of the operation, then the repo cache is left in a state that will cause errors when the partially-downloaded repo (or the cached repo mirror) is used. We might also have a similar problem with partial failures of file downloads.

If we encounter an error while trying to use the cached repo mirror (i.e. the bare git repo) and we have internet access, we should delete and re-download it. If we determine that a cached repo or file download is corrupted (e.g. because it fails checksum the checks suggested by #243 ), then we should re-clone it from our cached repo mirror.

At a minimum, this recovery work should be done whenever we run the forklift plt cache-repo command (and the respective recovery work should be done for the other plt cache-* subcommands. It might also make sense to do it whenever we run forklift plt stage/apply. Then forklift plt switch/upgrade should inherit that recovery work when they cache the pallet's requirements.

@ethanjli ethanjli added the bug Something isn't working label Jul 4, 2024
@ethanjli ethanjli added this to the Backlog milestone Jul 4, 2024
@ethanjli ethanjli changed the title Interrupting a cache operation with a partial failure leaves the cache in an invalid state Interrupting a caching operation with a partial failure leaves the cache in an invalid state Jul 4, 2024
@ethanjli ethanjli self-assigned this Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant