-
Notifications
You must be signed in to change notification settings - Fork 11
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
As a user, I want to validate a bundle that uses multiple versions of the Information Model / Discipline LDDs #188
Comments
After some investigating this is a bigger issue under the hood for SAX LSResourceResolver. Basically it is caching the old version of the IM and resolving based upon the namespace. i think the solution will need to be to check in the IM versions. if it ever switches, dump the cache. |
June schedule status: Delayed due to higher priority bug fixes and limited availability of resources. |
Build 11.0 Descope Rationale: Staff pulled off onto other flight projects. This will no impact the build and this ticket will be added to Build 11.1 |
After more investigations, we learn that because validate was not updating the list of schema locations for each label, a subsequent label was using the previous schema location(s). The error is very subtle and only shows up when the labels uses different Information Model (IM) version. For the case above, the first label process was bundle_cassini-huygens When each label is being validated, this list of schema location SHOULD be updated should solve the issue. This class need updating is src/main/java/gov/nasa/pds/tools/validate/rule/pds4/LabelValidationRule.java and the following code snippet:
can be at the beginning of function validateLabel(). This issue is very closely related to issue #210 so they both should be worked on together in one work unit. A run in DEV shows both labels are valid: % validate --skip-content-validation -r report_github188_label_valid_both.json -s json -t src/test/resources/github188/bundle_cassini-huygens-coradar.xml src/test/resources/github188/BILQH07S314_D065_T008S02_V02_without_Missing_Area_tag.xml % egrep "status|label" report_github188_label_valid_both.json |
…d in the same run and optionally report a warning in the report 1. Added resource github188 to src/test/resources 2. Added resource github210 to src/test/resources 3. Add new class to keep a list of unique IMs processed in LabelUtil.java 4. Add logic to register IM version for each label to LocationUtil.java and many debugs to find the bug in LabelValidator.java 5. Fix bug by setting schemaLocation for each label to allow multiple versions of the IM to be processed in LabelValidationRule.java 6. Consolidate long functions into shorter functions for readability in LabelValidationRule.java 7. Add debug logging to SchemaValidator.java 8. Add logic to report warning if requested for labels processed if multiple versions of IM processed in ValidateLauncher.java 9. Add new parameter PREFER_ALL_LABELS_SAME_INFORMATION_MODEL_VERSION to ConfigKey.java 10. Add new parameter PREFER_ALL_LABELS_SAME_INFORMATION_MODEL_VERSION to Flag.java 11. Add new parameter PREFER_ALL_LABELS_SAME_INFORMATION_MODEL_VERSION to FlagOptions.java 12. Add github188 and github210 tests to feature file validate.feature Refs: #188 As a user, I want to validate a bundle that uses multiple versions of the Information Model / Discipline LDDs #210 As a user, I want validate to raise a WARNING when differing versions of IM are used within a bundle
…back because report of WARNING is now default 1. Remove references to optional flag to report WARNING for multiple IM version in ConfigKey.java 2. Remove references to optional flag to report WARNING for multiple IM version in Flag.java 3. Remove references to optional flag to report WARNING for multiple IM version in FlagOptions.java 4. Modify failed test cases due to the WARNING messages are now automatic from feature file validate.feature 5. Remove some tests that are not as useful from feature file validate.feature Refs: #188 As a user, I want to validate a bundle that uses multiple versions of the Information Model / Discipline LDDs #210 As a user, I want validate to raise a WARNING when differing versions of IM are used within a bundle
...so that I can ensure the validity of the archive, even if I needed to use multiple versions of data dictionaries that may not be compatible.
Describe the bug
When reading in LDDs that are incompatible with older versions of the IM, validate appears to be ignoring the schemaLocation versions.
See #208 for more details
To Reproduce
Test Data
BILQH07S314_D065_T008S02_V02.xml.txt
bundle_cassini-huygens-coradar.xml.txt
The text was updated successfully, but these errors were encountered: