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

tool: disable gc in the presence of malformed gens #161

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

nikstur
Copy link
Member

@nikstur nikstur commented Apr 24, 2023

Disable GC if there are any malformed gens to avoid catastrophic failure when there are upstream changes to NixOS that are not handled in lzbt.

Suggested by @alois31

Closes #127

Disable GC if there are any malformed gens to avoid catastrophic failure
when there are upstream changes to NixOS that are not handled in lzbt.
Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nikstur nikstur merged commit b110161 into master Apr 24, 2023
@blitz blitz deleted the safeguard-gc branch April 25, 2023 09:39
@blitz
Copy link
Member

blitz commented Apr 25, 2023

@nikstur This is nice, but the problem is that the user does not know which generations to delete. Is there any easy way to make the user messages actionable?

@nikstur
Copy link
Member Author

nikstur commented Apr 25, 2023

We could add another variable broken_gens: Vec<u32> to the Installer that tracks the broken gens. Or we replace enable_gc with broken_gens and when it's not empty we disable gc. The last option might be cleaner if I think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Informative logging for malformed generations
3 participants