Skip to content

More verawood fixes (backport)#660

Merged
ormsbee merged 5 commits into
openedx:verawood-backportsfrom
ormsbee:more-verawood-fixes
Jul 14, 2026
Merged

More verawood fixes (backport)#660
ormsbee merged 5 commits into
openedx:verawood-backportsfrom
ormsbee:more-verawood-fixes

Conversation

@ormsbee

@ormsbee ormsbee commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

kdmccormick and others added 5 commits July 13, 2026 20:35
Restoring a library archive failed whenever any unit (or other
container/component) version had a blank title. Blank titles are legal
(PublishableEntityVersion.title is blank=True) and common -- content
imported from courses via the modulestore migrator frequently has
untitled units, and such content can be backed up.

The version title round-trips as an empty string, but
EntityVersionSerializer.title used CharField(required=True), which
defaults to allow_blank=False, so the empty string failed validation and
aborted the whole restore. Set allow_blank=True so blank titles validate.

The library_backup fixture's unit1 now has a blank title to exercise this
path, with a regression test asserting it restores correctly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prior to this commit, we would always assume the entity key would match
the directory naming, but that is not a hard requirement. Furthermore,
it looks like something in the backup code is adding hashes to the
directories unnecessarily, so this was coming up quite often.

Co-authored-by: Kyle McCormick <kyle@kylemccormick.me>
Modifying the Zip compressionlevel usually doesn't make much of a
difference, but when experimenting with a large library, I was seeing a
7.5% reduction in file size (614 MB vs 568 MB) by just toggling this
parameter. I suspect that this has something to do with how we're
incrementally building the Zip file during the backup process, since
simply creating a Zip file all at once from a directory does not show
this kind of difference.
@ormsbee ormsbee changed the title More verawood fixes More verawood fixes (backport) Jul 14, 2026
@ormsbee
ormsbee merged commit 69fa7e4 into openedx:verawood-backports Jul 14, 2026
6 of 7 checks passed
@ormsbee
ormsbee deleted the more-verawood-fixes branch July 14, 2026 14:19
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.

2 participants