More verawood fixes (backport)#660
Merged
Merged
Conversation
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.
kdmccormick
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports of