Skip to content
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

validate does not perform full bundle validation when using a specific bundle.xml #238

Closed
riverma opened this issue Jun 18, 2020 · 18 comments · Fixed by #258
Closed

validate does not perform full bundle validation when using a specific bundle.xml #238

riverma opened this issue Jun 18, 2020 · 18 comments · Fixed by #258
Assignees
Labels
enhancement New feature or request p.should-have

Comments

@riverma
Copy link

riverma commented Jun 18, 2020

Describe the bug
When the validate tool is provided a target, which happens to be a specific bundle.xml file as opposed to a bundle directory, the tool fails to perform product-level validation for products referenced within the various collections pointed to by the bundle.xml file.

To Reproduce

  1. Download the bundle located at: https://pds-imaging.jpl.nasa.gov/data/nsyt/insight_cameras/ (NOTE: don't download the entire bundle, but instead look to replicate something similar in the regression test suite)
  2. Validate the bundle by specifying the bundle.xml: validate -R pds4.bundle -t insight_cameras/bundle.xml
  3. Notice the following output DOES NOT include any product-level checks:
$ validate -R pds4.bundle -t insight_cameras/bundle.xml 
PDS Validate Tool Report

Configuration:
   Version                       1.21.0
   Date                          2020-06-18T21:54:01Z

Parameters:
   Targets                       [file:/insight_cameras/bundle.xml]
   Severity Level                WARNING
   Recurse Directories           true
   File Filters Used             [*.xml, *.XML]
   Data Content Validation       on
   Product Level Validation      on
   Max Errors                    100000
   Registered Contexts File      /validate/resources/registered_context_products.json



Product Level Validation Results

  PASS: file:/insight_cameras/bundle.xml

Summary:

  0 error(s)
  0 warning(s)


End of Report
Completed execution in 8203 ms

Expected behavior

  1. Download the bundle located at: https://pds-imaging.jpl.nasa.gov/data/nsyt/insight_cameras/
  2. Validate the bundle by specifying the bundle.xml: validate -R pds4.bundle -t insight_cameras/bundle.xml
  3. Expected output should be similar to when calling validate by pointing to the enclosing directory of the bundle (i.e. same as validate -R pds4.bundle -t insight_cameras/)
    • NOTE: the output will differ because the insight_cameras directory has multiple bundle*.xml labels. the expected functionality expected here is validate will only validate the input bundle*.xml for bundle validation. it may validate other bundle.xml files in the base directory, but it will only perform bundle validation (integrity checking) on the bundle input and the associated collections that it references.
$ validate -R pds4.bundle -t insight_cameras/bundle.xml 
PDS Validate Tool Report

Configuration:
   Version                       1.21.0
   Date                          2020-06-18T21:54:01Z

Parameters:
   Targets                       [file:/insight_cameras/bundle.xml]
   Severity Level                WARNING
   Recurse Directories           true
   File Filters Used             [*.xml, *.XML]
   Data Content Validation       on
   Product Level Validation      on
   Max Errors                    100000
   Registered Contexts File      /validate/resources/registered_context_products.json

Product Level Validation Results

  PASS: file:/insight_cameras/bundle.xml
..............................
  PASS: file:/insight_cameras/data/collection_data.xml
...
  PASS: file:/insight_cameras/data/sol/0212/mipl/edr/icc/C000M0212_615350914EDR_F0000_0461M2.xml
...
  PASS: file:/insight_cameras/data/sol/0212/mipl/rdr/icc/C000M0212_615350914CPG_F0000_0461M2.xml
...
  PASS: file:/insight_cameras/data/sol/0212/mipl/rdr/icc/C000M0212_615350914CSG_F0000_0461M2.xml
...
  PASS: file:/insight_cameras/data/sol/0212/mipl/rdr/icc/C000M0212_615350914DPG_F0000_0461M1.xml
...
  PASS: file:/insight_cameras/data/sol/0212/mipl/rdr/icc/C000M0212_615350914RZS_F0000_0461M1.xml
...
  PASS: file:/insight_cameras/data/sol/0212/mipl/rdr/icc/C000M0212_615350914ZPS_F0000_0461M1.xml

...

** Version of Software Used**
Version 1.21.0
Release Date: 2020-03-11 08:54:01
Core Schema: PDS4_PDS_1D00.xsd
Core Schematron: PDS4_PDS_1D00.sch

Test Data / Additional context
See: https://pds-imaging.jpl.nasa.gov/data/nsyt/insight_cameras/

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Red Hat Enterprise Linux Workstation release 7.3

Applicable requirements
n/a

@riverma riverma added bug Something isn't working triage-needed labels Jun 18, 2020
@jordanpadams jordanpadams added low enhancement New feature or request and removed triage-needed bug Something isn't working labels Sep 17, 2020
@jordanpadams jordanpadams added high and removed medium labels Sep 28, 2020
@tloubrieu-jpl tloubrieu-jpl added this to the PDS.02 (ends 2020-10-21) milestone Oct 7, 2020
@tloubrieu-jpl
Copy link
Member

For test, @qchaupds will use the cucumber behavioral test framework that he just set up.

@tloubrieu-jpl
Copy link
Member

@jordanpadams will update the ticket to make the resolution easier.

@jordanpadams
Copy link
Member

@riverma a quick note on your original ticket here:

The original request notes that you would like validate -t insight_cameras/bundle.xml to understand it is a bundle, and then set the rule -R pds4.bundle. however, we cannot make that assumption. if someone wants to do bundle validation, we must require they specify the rule explicitly. modified the ticket to handle this use case instead:

validate -R pds4.bundle -t insight_cameras/bundle.xml 

@jordanpadams
Copy link
Member

@qchaupds I've update some of the details of the ticket above. note specifically these mods:

  • the software should be able to handle this specific new use case (note the -R pds4.bundle):
$ validate -R pds4.bundle -t insight_cameras/bundle.xml 
  • also, the output will differ from

Run A:

validate -R pds4.bundle -t insight_cameras/

versus

Run B:

validate -R pds4.bundle -t insight_cameras/bundle.xml

Run A will match if and only if there is only 1 bundle product (Product_Bundle) in that directory. If there is more than one, validate simply uses the first one it finds as the bundle to use for integrity checking. This obviously doesn't work if you start to put additional newer versions in the directory, similar to what this directory has in it:

$ ls -al .
total 36
drwxrwxr-x 3 jpadams pds 4096 Oct 20 14:51 ./
drwxrwxr-x 3 jpadams pds 4096 Oct 20 14:59 ../
-rwxrwxr-x 1 jpadams pds 5233 Oct 20 14:12 bundle_5.0.xml*
-rwxrwxr-x 1 jpadams pds 5234 Oct 20 14:12 bundle_6.0.xml*
-rw-rw-r-- 1 jpadams pds 5412 Oct 20 14:12 bundle.xml

So instead of validating against the latest bundle, validate actually picks up bundle.xml first, and then ignores the other 2 versions. This is problematic because that means you are not performing integrity checking on the later versions of the bundle, which are probably more critical. For instance, when I ran it on a subset of data on pds-dev3:

  PASS: file:/home/jpadams/sandbox/insight_cameras/bundle.xml
      WARNING  [warning.integrity.member_not_found]   The member 'urn:nasa:pds:insight_cameras:browse' could not be found in any product within the given target.
      WARNING  [warning.integrity.member_not_found]   The member 'urn:nasa:pds:insight_cameras:calibration' could not be found in any product within the given target.
      WARNING  [warning.integrity.member_not_found]   The member 'urn:nasa:pds:insight_cameras:document' could not be found in any product within the given target.
      WARNING  [warning.integrity.member_not_found]   The member 'urn:nasa:pds:insight_cameras:miscellaneous' could not be found in any product within the given target.
      WARNING  [warning.integrity.member_not_found]   The member 'urn:nasa:pds:insight_cameras:xml_schema' could not be found in any product within the given target.
--
        25 integrity check(s) completed

  PASS: file:/home/jpadams/sandbox/insight_cameras/data/sol/0000/mipl/rdr/icc/C000M0000_596535111ZPS_F0000_0106M1.xml
        26 integrity check(s) completed

  PASS: file:/home/jpadams/sandbox/insight_cameras/bundle_5.0.xml
      WARNING  [warning.integrity.unreferenced_member]   Identifier 'urn:nasa:pds:insight_cameras::5.0' is not a member of any collection within the given target
        27 integrity check(s) completed

  PASS: file:/home/jpadams/sandbox/insight_cameras/bundle_6.0.xml
      WARNING  [warning.integrity.unreferenced_member]   Identifier 'urn:nasa:pds:insight_cameras::6.0' is not a member of any collection within the given target
        28 integrity check(s) completed

  PASS: file:/home/jpadams/sandbox/insight_cameras/data/sol/0000/mipl/rdr/icc/C000M0000_596533559RASLG0000_0106M9.xml
        29 integrity check(s) completed

when the software performs bundle validation and a specific bundle label is specified, it should still scan the directory where the bundle*.xml is located, but if it encounters another Product_Bundle with a matching logical_identifier as the specifiedProduct_Bundle, it should ignore it.

@qchaupds does that help? lots of words here though. let me know if you want to talk through this.

@jordanpadams
Copy link
Member

also, btw, there is a large test bundle out at pds-dev3:/data/home/pds4/insight_cameras. and the run report from my tests above on a subset of that data is at /home/jpadams/sandbox/run_20201020.txt.

One way to test faster is to use the --skip-content-validation flag, which does not actually open of the data products themselves and validate them. will save significant amount of time on large data sets.

@tloubrieu-jpl
Copy link
Member

New feature is working but regression test are failing.

qchaupds pushed a commit that referenced this issue Oct 27, 2020
… add LidVid, TargetExaminer, and BundleManager classes. Modify crawler to receive a list of files to ignore. Modify LocationValidator to make exception when a pds4.bundle rule is specified at command line when target is a file.
@jordanpadams jordanpadams changed the title validate does not perform product-level validation when specifying a specific bundle.xml validate does not perform full bundle validation when using a specific bundle.xml Oct 27, 2020
qchaupds pushed a commit that referenced this issue Nov 2, 2020
…urther check for collection file referenced by the specified bundle, add logic for target as directory to check for collection file referenced by the latest bundle file, remove print statements in favor of logger, add getTargetContent() to TargetExaminer to fetch certain elements of a target.
qchaupds pushed a commit that referenced this issue Nov 2, 2020
…erence a collection file from the latest bundle, add more debug to understand code execution.
qchaupds pushed a commit that referenced this issue Nov 4, 2020
… Remove extraneous logging messages, add logic to handle when bundle refer to collection using lid_reference instead of lidvid_reference, modify TargetExaminer to check for empty string before adding to fieldContent, add error message to log in FileCrawler if called using non-directory as input.
jordanpadams added a commit that referenced this issue Nov 5, 2020
Code changes to support issue #238
@riverma
Copy link
Author

riverma commented Nov 12, 2020

Thank you @jordanpadams and @qchaupds for your hard work!

Just to ensure I'm understanding the scope #258 correctly: for an accumulating PDS 4 bundle, where there are different bundle.xml files per release, being able to specify a given bundle.xml file will now ensure that only the products associated with that particular bundle.xml set of collections will be validated? In other words, we'll be able to cut down our accumulating bundle validation time significantly by only validating a particular release within that accumulating bundle?

@jordanpadams
Copy link
Member

@riverma correct. you will see some warnings like this:

WARNING  [warning.file.not_referenced_in_label]   File is not referenced by any label

for all old versions of collection labels that are laying around in the directory structure, but otherwise, we skip those and only do referential integrity checking on the latest version of the collection (or the specific version of the collection if referenced by lidvid)

@riverma
Copy link
Author

riverma commented Nov 13, 2020

@riverma correct. you will see some warnings like this:

WARNING  [warning.file.not_referenced_in_label]   File is not referenced by any label

for all old versions of collection labels that are laying around in the directory structure, but otherwise, we skip those and only do referential integrity checking on the latest version of the collection (or the specific version of the collection if referenced by lidvid)

@jordanpadams - that's awesome - looking forward to cutting down the validate processing time. Thank you guys. 👍

@riverma
Copy link
Author

riverma commented Apr 15, 2021

do referential integrity checking on the latest version of the collection (or the specific version of the collection if referenced by lidvid)

@jordanpadams - just wanted to confirm one thing on your previous post here, assuming we're not using lidvid refs in our bundle_XYZ.xml file, through this patch validate searches for the "latest version" of a collection via the respective collection_<name>_XYZ.xml file by Unix timestamp of the file or internal (highest) <Product_Collection><Identification_Area><version_id> field within the file? Or some other logic?

@jordanpadams
Copy link
Member

@riverma it uses the version_id

@riverma
Copy link
Author

riverma commented Apr 15, 2021

Thanks @jordanpadams 👍

@riverma
Copy link
Author

riverma commented Jun 2, 2021

Hi @qchaupds @jordanpadams -

I want to share three test validate runs we recently ran that provided unexpected behavior compared to the expectations of this ticket.

In short: running bundle-level validation execution with a specific bundle.xml file in hand seems to have execution time as long as is the case when not specifying a particular bundle.xml. The execution time is far longer than we would expect when looking only at particular tagged bundle.xml file while also not performing product-level validation.

Could you help assess if we're running the correct commands or else if this ticket needs to be reopened?

Test 1: bundle-level only with v1.25.0 and targeted bundle.xml file

Validate version: 1.25.0-SNAPSHOT
Command: validate -R pds4.bundle -t /.../insight_cameras/bundle_8.0.xml -r validate-report.txt
Expected execution time: ~1-24 hours
Expected products passed: 30209 <-- the no. of products referenced by bundle_8.0.xml collections
Actual execution time: Completed execution in 413184556 ms <-- 4 days 18 hours 46 minutes
Validate report summary <-- notice 421895 ref integrity checks completed instead of expected 30209

Summary:

  2 error(s)
  199038 warning(s)

  Product Validation Summary:
    421895     product(s) passed
    0          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    421898     check(s) passed
    2          check(s) failed
    0          check(s) skipped

  Message Types:
    2            error.table.records_mismatch
    199032       warning.integrity.unreferenced_member
    5            warning.file.not_referenced_in_label
    1            warning.integrity.member_not_found

Test 2 bundle-level only with v2.0.3 and targeted bundle.xml file

Validate version: Version 2.0.3
Command: /../validate-2.0.3/bin/validate -R pds4.bundle -t /.../insight_cameras/bundle_8.0.xml -r validate-report-v2validate.txt
Expected execution time: ~1-24 hours
Expected products passed: 30209 <-- the no. of products referenced by bundle_8.0.xml collections
Actual execution time: Completed execution in 444450579 ms <-- 5 days 3 hours 27 minutes
Validate report summary: <--- notice 420866 ref integrity checks completed instead of expected 30209 and that we received validation internal error Java exceptions (also provided below)

Summary:

  1037 error(s)
  199043 warning(s)

  Product Validation Summary:
    420860     product(s) passed
    1          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    420866     check(s) passed
    1034       check(s) failed
    0          check(s) skipped

  Message Types:
    1034         error.validation.internal_error
    2            error.table.records_mismatch
    1            error.label.filesize_mismatch
    199032       warning.integrity.unreferenced_member
    5            warning.pdf.file.not_pdfa_compliant
    5            warning.file.not_referenced_in_label
    1            warning.integrity.member_not_found

Exceptions / errors during run:

...
..............................................................................................................................java.lang.reflect.InvocationTargetException                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
        at java.lang.reflect.Method.invoke(Method.java:498)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
        at gov.nasa.pds.tools.validate.rule.AbstractValidationRule.execute(AbstractValidationRule.java:71)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
        at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
        at gov.nasa.pds.tools.validate.rule.pds4.LabelInFolderRule$1.run(LabelInFolderRule.java:154)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
        at java.lang.Thread.run(Thread.java:748)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
        at gov.nasa.pds.objectAccess.TableReader.countRecordsForTextTable(TableReader.java:353)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
        at gov.nasa.pds.objectAccess.TableReader.countRecordsForTableAdapterType(TableReader.java:378)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
        at gov.nasa.pds.objectAccess.TableReader.getRecordSize(TableReader.java:419)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
        at gov.nasa.pds.tools.validate.rule.pds4.TableDataContentValidationRule.validateTableDataContents(TableDataContentValidationRule.java:296)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
        ... 12 more                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
java.lang.reflect.InvocationTargetException                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
        at java.lang.reflect.Method.invoke(Method.java:498)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
        at gov.nasa.pds.tools.validate.rule.AbstractValidationRule.execute(AbstractValidationRule.java:71)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
        at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
        at gov.nasa.pds.tools.validate.rule.pds4.LabelInFolderRule$1.run(LabelInFolderRule.java:154)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
        at java.lang.Thread.run(Thread.java:748)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
        at gov.nasa.pds.objectAccess.TableReader.countRecordsForTextTable(TableReader.java:353)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
        at gov.nasa.pds.objectAccess.TableReader.countRecordsForTableAdapterType(TableReader.java:378)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
        at gov.nasa.pds.objectAccess.TableReader.getRecordSize(TableReader.java:419)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
        at gov.nasa.pds.tools.validate.rule.pds4.TableDataContentValidationRule.validateTableDataContents(TableDataContentValidationRule.java:296)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
        ... 12 more                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
Completed execution in 444450579 ms   

Test 3 bundle+product level with v1.25.0 and targeted bundle.xml file

Validate version: 1.25.0-SNAPSHOT
Command: validate -t /.../insight_cameras/bundle_8.0.xml -r validate-report.txt
Expected execution time: ~5 days
Expected products passed: 30209 <-- the no. of products referenced by bundle_8.0.xml collections
Actual execution time: ~5 days
Validate report summary:


>>>>>>>>>>>>>>> ./validate_set_ad.log:
Summary:

  0 error(s)
  0 warning(s)

  Product Validation Summary:
    105475     product(s) passed
    0          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    0          check(s) passed
    0          check(s) failed
    0          check(s) skipped


End of Report

<<<<<<<<<<<<<<<


>>>>>>>>>>>>>>> ./validate_set_ab.log:
Summary:

  0 error(s)
  0 warning(s)

  Product Validation Summary:
    105476     product(s) passed
    0          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    0          check(s) passed
    0          check(s) failed
    0          check(s) skipped


End of Report

<<<<<<<<<<<<<<<


>>>>>>>>>>>>>>> ./validate_set_aa.log:
Summary:

  0 error(s)
  0 warning(s)

  Product Validation Summary:
    105476     product(s) passed
    0          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    0          check(s) passed
    0          check(s) failed
    0          check(s) skipped


End of Report

<<<<<<<<<<<<<<<


>>>>>>>>>>>>>>> ./validate_referential.log:
Summary:

  2 error(s)
  134698 warning(s)

  Product Validation Summary:
    421895     product(s) passed
    0          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    421893     check(s) passed
    2          check(s) failed
    0          check(s) skipped

  Message Types:
    2            error.table.records_mismatch
    134697       warning.integrity.unreferenced_member
    1            warning.integrity.member_not_found

End of Report

<<<<<<<<<<<<<<<


>>>>>>>>>>>>>>> ./validate_set_ac.log:
Summary:

  0 error(s)
  0 warning(s)

  Product Validation Summary:
    105476     product(s) passed
    0          product(s) failed
    0          product(s) skipped

  Referential Integrity Check Summary:
    0          check(s) passed
    0          check(s) failed
    0          check(s) skipped


End of Report

<<<<<<<<<<<<<<<

>>>>>>>>>>>>>>> OVERALL SUMMARY:
Summary:

  2 error(s)
  134698 warnings(s)

End of Report

<<<<<<<<<<<<<<<

@jordanpadams
Copy link
Member

jordanpadams commented Jun 2, 2021

@riverma can you please refer us to where these products are so we can take a look? additionally, can you please send us the report files referenced above.

@qchaupds
Copy link
Contributor

qchaupds commented Jun 2, 2021

@riverma @jordanpadams There is a possibility that the additional time is taken up from the additional checks we put in the past few months for a bundle. The additional checks were put in for issue #308.

Will have a closer look to see if this task can be done the same time when the label is already in memory.

@jordanpadams
Copy link
Member

@riverma after taking a look at this, a few comments:

  1. it looks like the run results are expected. even if the product does not belong to a collection, it will count as passing referential integrity checks, but it will throw a WARNING that is missing.
  PASS: file:/Users/jpadams/Documents/proj/pds/pdsen/workspace/validate/src/test/resources/github291/valid/VALID_odf07155_msgr_11.xml
      WARNING  [warning.integrity.unreferenced_member]   Identifier 'urn:nasa:pds:mess-rs-raw:data.odf:mess_rs_07155_156_60s_odf::1.0' is not a member of any collection within the given target
        6 integrity check(s) completed
  1. Bundle 8.0 should reference all collections and all products in the archive. those WARNINGs about products not be referenced, are correct and I would highly recommend not ignoring. the registry and all tools accessing the registry will have no knowledge of all the missing products, and those would all technically be superseded within the system.

  2. per the performance issues, we will add this to our next build to re-evaluate again. as we continue to add new features to validate, it will, unfortunately, most likely get slower.

@jordanpadams
Copy link
Member

@riverma @jordanpadams There is a possibility that the additional time is taken up from the additional checks we put in the past few months for a bundle. The additional checks were put in for issue #308.

Will have a closer look to see if this task can be done the same time when the label is already in memory.

@qchaupds rishi is running a version of validate that does not include those updates

@jordanpadams
Copy link
Member

@riverma one additional note:

The execution time is far longer than we would expect when looking only at particular tagged bundle.xml file while also not performing product-level validation.

you execution includes both content and product level validation. if you only want referential integrity checking, use the following command:

# Execute bundle validation but only check bundle/collection validity and ignore the products
validate --skip-product-validation -R pds4.bundle -t my_bundle

See https://nasa-pds.github.io/validate/operate/index.html#Advanced_Bundle_Validation for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p.should-have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants