better workflow for migrating from profile manifest version 3 #177

Closed
opened 2024-03-25 08:19:46 +00:00 by yu-re-ka · 7 comments
Member

When migrating from nix to lix, a newer profile manifest version might already be in use. This can be worked around by deleting the profile and re-creating it with lix, however this is a cumbersome workflow and not really user friendly.

Describe the solution you'd like

Some kind of backwards migration or compatibility code for nix profile manifest >=3

Describe alternatives you've considered

Leaving it as-is and adding documentation for the workaround

Additional context

$ nix profile list
error: profile manifest '/nix/var/nix/profiles/per-user/yuka/profile/manifest.json' has unsupported version 3
## Is your feature request related to a problem? Please describe. When migrating from nix to lix, a newer profile manifest version might already be in use. This can be worked around by deleting the profile and re-creating it with lix, however this is a cumbersome workflow and not really user friendly. ## Describe the solution you'd like Some kind of backwards migration or compatibility code for nix profile manifest >=3 ## Describe alternatives you've considered Leaving it as-is and adding documentation for the workaround ## Additional context ``` $ nix profile list error: profile manifest '/nix/var/nix/profiles/per-user/yuka/profile/manifest.json' has unsupported version 3 ```
jade added this to the v2.90 milestone 2024-03-25 08:22:54 +00:00
jade added this to the Release engineering project 2024-03-25 08:22:58 +00:00
qyriad added the
ux
label 2024-03-25 19:29:36 +00:00
Owner

this looks like a real quagmire. first nix profile itself was made more friendly (why was this index-based to begin with): nix profile: Allow referring to elements by human-readable name #8678
then a new profile version came along to support this: Make profile element names stable #9656
and after that a whole slew of refactorings and bugfixes that we really don't want to untangle.

not sure what the best way forward is. simply migrating back down from version 3 to version 2 should be possible, but it's going to break the ux of newer nix profile versions.

this looks like a real quagmire. first `nix profile` itself was made more friendly (***why*** was this index-based to begin with): [` nix profile: Allow referring to elements by human-readable name #8678 `](https://github.com/NixOS/nix/pull/8678)\ then a new profile version came along to support this: [` Make profile element names stable #9656 `](https://github.com/NixOS/nix/pull/9656)\ and after that a whole slew of refactorings and bugfixes that we really don't want to untangle. not sure what the best way forward is. simply migrating back down from version 3 to version 2 should be possible, but it's going to break the ux of newer `nix profile` versions.
jade added the
release-blocker
label 2024-03-28 19:03:06 +00:00
qyriad added the
Area/profiles
label 2024-04-27 04:47:53 +00:00
Owner

Should we support manifest v3 instead?

Should we support manifest v3 instead?
Owner

if we remember correctly that was on the original backports list but we dropped it for being a huge pain in the tail, additionally to being a dependency hell of refactorings needed to pull it in at all. it also had unfortunate interactions with flake url parsing for some fucking reason

if we remember correctly that *was* on the original backports list but we dropped it for being a huge pain in the tail, additionally to being a dependency hell of refactorings needed to pull it in at all. it also had unfortunate interactions with flake url parsing for some fucking reason
qyriad self-assigned this 2024-04-29 17:58:52 +00:00
Owner

Hm… looking at the diff we think we might be able to do it. Should we give it a shot or should we just implement migration from 3 to 2?

As much as maybe nix profile should be removed anyway, it also really shouldn't have been index based to begin with…

Hm… looking at the diff we think we might be able to do it. Should we give it a shot or should we just implement migration from 3 to 2? As much as maybe nix profile [should be removed](https://git.lix.systems/NixOS/nix/issues/10098#issuecomment-179) anyway, it also really shouldn't have been index based to begin with…
Owner

undoing a 2->3 migration feels more fraught than implementing v3 support, so if you want to try do go ahead! we mostly didn't at the time because we had no energy to rewrite the patches sufficiently to make them apply, and then discarded the whole thing for being unlikely to affect most users (because nixpkgs doesn't have those features either).

undoing a 2->3 migration feels more fraught than implementing v3 support, so if you want to try do go ahead! we mostly didn't at the time because we had no energy to rewrite the patches sufficiently to make them apply, and then discarded the whole thing for being unlikely to affect most users (because nixpkgs doesn't have those features either).
Owner

Hm, the upstream PR removed support for specifying stuff via index. I'm wondering if we should also do that? Feels like it could still be handy for scripting or something

Hm, the upstream PR *removed* support for specifying stuff via index. I'm wondering if we should also do that? Feels like it could still be handy for scripting or something
ktemkin modified the project from Release engineering to Soft Launch 2024-05-02 00:53:48 +00:00
Owner
Done: - Mege commit: 076dfd30c6167cfb8f5003a36baef4438f687782 - CLs: https://gerrit.lix.systems/c/lix/+/977 to https://gerrit.lix.systems/c/lix/+/982/4
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#177
No description provided.