Migrating V1 to V2 content Libraries

I am preparing the plan for on migrating edx.org’s V1 content libraries to be stored as v2 content Libraries in blockstore. We are doing this so that they can use new features like the library-authoring mfe and the reference content block.

I’m wondering if others in the community have gone through this process before, or have thought about it, or have any insights they might share.

Roughly the plan looks like:
In A Management Command on CMS: For each V1 library: (on stage grab every prod v1 lib and stage v1 lib.) export the V1 library by calling the api.

  • Manipulate the v1 library tar.gz file so it could be imported into a v2 library.

  • Perform some amount of tests.

  • Import the library into the V2 library.

  • Write down a mapping of V1 lib id to V2 lib Id.

  • Note any failures. Resolve them.

In Another Management Command:

  • Find all references to V1 libraries in randomized content xblocks.

  • Replace all those references with references to the V2 version.

We will not deal with any static asset migration, as the contentstore links will still work, for now.

My big questions are:

  • Does the process of updating xblocks in courses seems logical? we will have to either auto-publish or manually publish hundreds of courses, which has a certain amount of risk?
  • Has anyone tried this before? how did it go?
  • Are there any known pitfalls with exporting v1 library content?
2 Likes

I don’t know of anyone doing a major v1 → v2 migration yet. The v2 authoring MFE has been behind a feature flag and off by default so not many have used it.

There is not any need to do the migration all at once, so I’d suggest starting with one library and its related courses, then give it some time to see how it’s working, then try 5 libraries+their courses, then 10, then 50, then do everything once all the kinks are worked out.

1 Like

We are also planning to change the storage backed of v2 libraries from blockstore to learning-core (which will build on the lessons learned from blockstore and is also OLX-file-based, unlike modulestore/v1). So that future upgrade of the backend should be easier. But depending on timelines some open edx instances may prefer to wait to do v1 → v2[learning-core] rather than v1 → v2[blockstore] → v2[learning-core].

Hi Braden, I’ll get involved in that thread, but you raise some interesting points. Thanks!

@chaugh once you go through this process, I’d love to produce a public How-To for this transition for others in the same boat. We’ll eventually want to deprecate/delete libraries-v1 and a doc like this will be really useful for that.

Is there anything I can do now to make easier to produce that How-To?

1 Like