conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
142 stars 46 forks source link

[ENH] - Provide code to migrate from v1 to v2 `NamespaceRoleMapping` #681

Open nkaretnikov opened 9 months ago

nkaretnikov commented 9 months ago

Feature description

This is intended as a follow up to https://github.com/conda-incubator/conda-store/pull/607.

NamespaceRoleMapping (v1) and NamespaceRoleMappingV2 (v2) role mappings have incompatible formats.

Because of this, we cannot transparently migrate users to the v2 table:

Value and/or benefit

Since the migration code copying data from v1 to v2 might fail, we won't migrate users automatically. Otherwise, they won't be able to migrate to v2 due to errors. However, I'll provide standalone code in the documentation for users who want to migrate their data and are ready to resolve SQL issues that might arise during migration. This code will just be a function they could call and will be tested on potentially problematic cases.

The high-level view of the migration algorithm is as follows (I have a WIP implementation locally):

Notes:

Anything else?

No response