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 maintain history of other versions it comes across as it traverses directories causing erroneous WARNING messages #597

Closed
jordanpadams opened this issue Feb 17, 2023 · 9 comments · Fixed by #615
Assignees
Labels

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Feb 17, 2023

Checked for duplicates

Yes - I have checked

🐛 Describe the bug

Per NASA-PDS/operations#322 (comment) and the validate report denoted in NASA-PDS/operations#322, validate is throwing erroneous WARNING messages for past versions of bundles/collections in the directory used as the target.

🕵️ Expected behavior

Validate would maintain an understanding of past versions of bundles and the past versions of collections they refer to, and simple SKIP validation of those products without throwing a WARNING.

📜 To Reproduce

  1. download either of the test data sets
  2. run validate -R pds4.bundle -t /path/to/naif/dataset
...
  PASS: file:/Users/jpadams/test/naif3/spice_kernels/collection_spice_kernels_inventory_v001.csv
      WARNING  [warning.file.not_referenced_in_label]   File is not referenced by any label
        3 integrity check(s) completed

  PASS: file:/Users/jpadams/test/naif3/spice_kernels/collection_spice_kernels_inventory_v002.csv
      WARNING  [warning.file.not_referenced_in_label]   File is not referenced by any label
        4 integrity check(s) completed
...
Summary:

  0 error(s)
  2 warning(s)

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

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

  Message Types:
    2            warning.file.not_referenced_in_label

🖥 Environment Info

  • Version of this software: 3.1.1
  • Operating System: MacOSX

📚 Version of Software Used

v3.1.1

🩺 Test Data / Additional context

https://naif.jpl.nasa.gov/pub/naif/pds/pds4/mars2020/mars2020_spice/

or for a smaller data set:

https://pds.nasa.gov/data/pds4/test-data/custom-datasets/naif3/

🦄 Related requirements

No response

⚙️ Engineering Details

Looks like regression was introduced prior to v3.1.1. Do not see this in v3.0.3

@jordanpadams
Copy link
Member Author

@al-niessner wrap up your current ticket, and then let's loop back to this and another ticket I am about to create that have introduced a couple regressions

@jordanpadams jordanpadams changed the title Validate does not maintain history of past versions in directories causing erroneous WARNING messages Validate does not maintain history of other versions it comes across as it traverses directories causing erroneous WARNING messages Feb 17, 2023
@jordanpadams jordanpadams added icebox and removed B13.1 labels Mar 9, 2023
@al-niessner
Copy link
Contributor

@jordanpadams @nutjob4life @tloubrieu-jpl

Seems like a bad state to be in the icebox and high priority. If one of the two states where to change, which is the correct answer.

@jordanpadams
Copy link
Member Author

@al-niessner removed the high priority tag

@jordanpadams
Copy link
Member Author

@al-niessner ☝️

@jordanpadams
Copy link
Member Author

@al-niessner note: this is for the legacy file system validate, not registry validator

@al-niessner
Copy link
Contributor

@jordanpadams @nutjob4life @tloubrieu-jpl

I am getting these fatals:

  FAIL: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/document/
      ERROR  [error.validation.file_naming_problem]   Directory name conflicts in case with the name of another file or directory

  FAIL: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/
      ERROR  [error.validation.file_naming_problem]   Directory name conflicts in case with the name of another file or directory

Can somebody explain what it means and how to fix it? On the naif site referenced in the top of this issue the directories are document and spice_kernels. They are the only directories. They also match the case of the href and lidvids in all the files. grep -r cannot find any spice_kernels with any variation of case. Make understanding this error a bit tricky.

@al-niessner
Copy link
Contributor

@jordanpadams @nutjob4life @tloubrieu-jpl

This problem is more complicated than what the initial statement make it out to be. First, the base bundles are skipped (implied through initial statements validate summary):

  SKIP: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/bundle_mars2020_spice_v001.xml
      INFO  [info.integrity.unreferenced_file]   Skipping file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/bundle_mars2020_spice_v001.xml due to version not latest version

  SKIP: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/bundle_mars2020_spice_v002.xml
      INFO  [info.integrity.unreferenced_file]   Skipping file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/bundle_mars2020_spice_v002.xml due to version not latest version

  SKIP: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/collection_spice_kernels_v002.xml
      INFO  [info.integrity.unreferenced_file]   Skipping file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/collection_spice_kernels_v002.xml due to collection not latest or does not sharing the same logical_identifier as the bundle target

  SKIP: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/collection_spice_kernels_v001.xml
      INFO  [info.integrity.unreferenced_file]   Skipping file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/collection_spice_kernels_v001.xml due to collection not latest or does not sharing the same logical_identifier as the bundle target

Since the old versions are skipped, validate cannot have a memory or have a knowledge of them. To get the knowledge or memory, the past units would have to be processed to include warts and all. The other obvious option is to simply ignore not referenced objects but then it also include objects that are not just previous versions.

How do we want to resolve this conundrum as it is politics that will decide the technological?

@jordanpadams
Copy link
Member Author

@al-niessner understood. I am OK with this:

INFO  [info.integrity.unreferenced_file]   Skipping file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/collection_spice_kernels_v001.xml due to collection not latest or does not sharing the same logical_identifier as the bundle target

If possible, I would like us to read in these skipped labels, identify the files associated with it, and ignore those as well. the confusing part is it finds and skips these labels, but then it throws a WARNING on the associated inventory file (CSV):

  PASS: file:/Users/jpadams/test/naif3/spice_kernels/collection_spice_kernels_inventory_v002.csv
      WARNING  [warning.file.not_referenced_in_label]   File is not referenced by any label

does that make sense?

@al-niessner
Copy link
Contributor

@jordanpadams @nutjob4life @tloubrieu-jpl

Ready for review or nearly. It now works as requested but am getting these two errors:

  FAIL: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/spice_kernels/
      ERROR  [error.validation.file_naming_problem]   Directory name conflicts in case with the name of another file or directory

  FAIL: file:/home/niessner/Projects/PDS/validate/src/test/resources/github597/Document/
      ERROR  [error.validation.file_naming_problem]   Directory name conflicts in case with the name of another file or directory

They have nothing to do with this ticket. I do not understand them so cannot correct them. If anyone can tell me what they are and how to correct them, then I can set this up in features for regression testing. Otherwise the code is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants