Skip to content

docs: add how-to for merging V1 library OLX exports into a V2 ZIP#3087

Open
irfanuddinahmad wants to merge 3 commits into
openedx:masterfrom
irfanuddinahmad:irfanuddinahmad/document-v1-v2-export-format-2877
Open

docs: add how-to for merging V1 library OLX exports into a V2 ZIP#3087
irfanuddinahmad wants to merge 3 commits into
openedx:masterfrom
irfanuddinahmad:irfanuddinahmad/document-v1-v2-export-format-2877

Conversation

@irfanuddinahmad

Copy link
Copy Markdown

Summary

  • Adds docs/how_tos/migrate_v1_libraries_to_v2.rst — a step-by-step operator guide for merging one or more V1 (legacy) library OLX exports into a single V2 backup ZIP.
  • Covers format differences (V1 XML vs V2 TOML), the full merge workflow (extract → scaffold → convert components → optionally create collections → zip → load), and caveats (version history not preserved, course usage_key references not auto-updated).
  • Depends on the openedx-core backup/restore format documentation: Document backup/restore format openedx-core#492 (PR: irfanuddinahmad/document-backup-restore-format-492).

Closes #2877

Test plan

  • Follow the guide end-to-end: export a V1 library from a local Studio, walk through the merge steps, run lp_load, and confirm the library appears in Studio's V2 library list with the expected components.
  • Verify RST renders correctly (e.g. via rst2html or a local Sphinx build).

🤖 Generated with Claude Code

Operators who hold multiple legacy (V1) library exports and want to
import them into a V2 content library previously had no documented path.
This how-to walks through the manual merge process step-by-step:
extracting V1 archives, scaffolding the V2 directory layout, converting
each component (block XML + static assets + entity TOML), optionally
creating collections, and loading the resulting ZIP via lp_load.

Closes openedx#2877

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jun 8, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @irfanuddinahmad!

This repository is currently maintained by @bradenmacdonald.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Jun 8, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Jun 8, 2026
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.62%. Comparing base (94900a0) to head (172a6d5).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3087    +/-   ##
========================================
  Coverage   95.61%   95.62%            
========================================
  Files        1391     1392     +1     
  Lines       33077    33131    +54     
  Branches     7444     7706   +262     
========================================
+ Hits        31628    31681    +53     
- Misses       1396     1397     +1     
  Partials       53       53            

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@irfanuddinahmad irfanuddinahmad force-pushed the irfanuddinahmad/document-v1-v2-export-format-2877 branch from 002ff55 to ceb411e Compare June 9, 2026 09:02
@irfanuddinahmad irfanuddinahmad force-pushed the irfanuddinahmad/document-v1-v2-export-format-2877 branch from ceb411e to 214bb68 Compare June 9, 2026 09:03
@farhan farhan requested a review from Copilot June 9, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds operator-facing documentation for manually merging legacy (V1) library exports into a V2 backup ZIP format, and updates CI coverage upload tooling.

Changes:

  • Added a step-by-step how-to for converting V1 OLX exports into a V2 library backup archive.
  • Updated Codecov GitHub Action pin from v6.0.0 to v7.0.0 in CI validation workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/how_tos/migrate_v1_libraries_to_v2.rst New migration how-to documentation for merging V1 library exports into a V2 archive.
.github/workflows/validate.yml Bumps Codecov Action to v7.0.0 for coverage upload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/how_tos/migrate_v1_libraries_to_v2.rst Outdated
Comment thread docs/how_tos/migrate_v1_libraries_to_v2.rst Outdated
Comment thread docs/how_tos/migrate_v1_libraries_to_v2.rst
- Replace incomplete Atlassian /pages/ URL with the public GitHub DEPR
  issue (edx-platform#32457) for the V1 library deprecation timeline
- Add conditional cp command to handle both V1 XML export layouts
  (subdirectory definition.xml and flat <block_id>.xml)
- Clarify that the <type>/ directory for the entity TOML is already
  created by step 4b's mkdir -p

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@@ -0,0 +1,228 @@
Merging V1 Library Exports into a V2 Archive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@irfanuddinahmad Could you share how you generated these details and what sources or references you used? Also, how can I verify that all of this information is accurate?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the question, @salman2013!

This document was generated with Claude Code (AI-assisted), and the primary source I relied on was the V2 backup/restore format specification in openedx/openedx-core#492, which documents the package.toml, per-entity TOML layout, and component_versions/v1/block.xml directory structure. The V1 side (OLX export format: library.xml, <type>/<block_id>/definition.xml, static/) is the existing well-known export produced by Studio's Export feature.

How to verify:

  1. Against the format spec — Cross-check the TOML structure shown in steps 3 and 4e against the schema defined in Document backup/restore format openedx-core#492 (or its merged docs once landed).
  2. End-to-end on a local instance — Follow the test plan in the PR description: export a real V1 library from a local Studio, walk through the merge steps, run lp_load, and confirm the library appears in the V2 library list with all expected components. This is the most reliable verification.
  3. Spot-check the TOML files against an actual V2 backup ZIP exported from a working V2 library instance — the structure should match exactly.

I'm happy to update any steps if you find discrepancies during testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

[verawood] Legacy Libraries DEPR: Document V1->V2 export format changes

5 participants