test: Ensure back-compat of new _code fields in TOML archives#552
test: Ensure back-compat of new _code fields in TOML archives#552kdmccormick wants to merge 1 commit intomainfrom
Conversation
42199b5 to
9a5b342
Compare
9a5b342 to
f4ba024
Compare
|
@ormsbee @bradenmacdonald Could I get your take on which of these formats to use for Verawood? I'm leaning 2 or 3. All of these could be implemented to be backwards-compatible with Ulmo instances. Existing Ulmo-generated archives would be forwards compatible with Verawood instances, as the Verawood instance would just fall back to parsing Option 1This is what I have implemented now. [entity.component]
component_type = "xblock.v1:html"
component_code = "c22b9f97-f1e9-4e8f-87f0-d5a3c26083e2"Option 2This would match how an [entity.component."xblock.v1".html]
component_code = "c22b9f97-f1e9-4e8f-87f0-d5a3c26083e2"Option 3No changes for Verawood. Just continue parsing |
|
For containers, I have similar question. Option 1 doesn't make sense given the existence of Option 2[entity.container.subsection]
container_code = "unit-foo-bar-baz"Option 3No changes. Just continue using |
|
I think (1) or (3). The container_code and container_type are things handled by the |
|
Option (1) is unfortunately impossible for containers without breaking Ulmo backcompat, due to how strict this existing validation code is: openedx-core/src/openedx_content/applets/backup_restore/serializers.py Lines 131 to 135 in cbc344b That is, the following TOML [entity.container]
container_code = "blah"
[entity.container.subsection]
...will yield Given that, I think we should keep things simple and just wait until "v2" before making any backup-restore format changes. As an aside @ormsbee @bradenmacdonald , if/when we do TOML v2, I think we should aim to make Restore fairly permissive as to allow future backwards-compatible additions to the format. |
[Do Not Merge]
This is a test PR to see how changes to the backup-restore format in #544 and #545 would work on Ulmo instance.
This PR is based on v0.30.2, which is what
release/ulmopins.Context: #544 (comment)