-
Notifications
You must be signed in to change notification settings - Fork 54
Add minimum required version to rdmo xml exports and check at import #1232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add minimum required version to rdmo xml exports and check at import #1232
Conversation
…ally validate it at import Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
rdmo/core/xml.py
Outdated
| _('This RDMO XML file does not have a valid version number.'), | ||
| f'XML Version ({root_version}) is greater than RDMO instance version {rdmo_version}' | ||
| _('This RDMO XML file was created with a newer version of RDMO and cannot be imported.'), | ||
| _('Backwards compatibility is not supported for RDMO versions lower than 2.0.0.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "Backwards compatibility" is the wrong term here. It is more like forward compatibility. Actually the whole block makes no sense, since it will only be shipped with RDMO 2.3.0 which is > 2.0.0, right? (Did I get something wrong?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the case when a RDMO 1.x tries to import an XML from RDMO 2.x.
It is maybe an edge-.. Ohw now I see 🙃, this code will not even exist in the RDMO 1.x 🤣
I'll remove this, thanks for noticing!
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
jochenklar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
Related issue: #1205
This PR adds the field
requiredto the exported XML files. This field sets the minimal compatible RDMO version with which this file can be imported. A validation error will be raised when the RDMO version is lower than therequiredversion. When this field is missing, it is ignored.The field
versionis still used for version dependent conversions at import but not for compatibility validation.The minimal compatible version is defined in the setting
EXPORT_MIN_REQUIRED_VERSION.Motivation and Context
How has this been tested?
Screenshots (if appropriate)