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 accurately check for missing_constant values #690

Closed
lylehuber opened this issue Aug 28, 2023 · 5 comments · Fixed by #692
Closed

Validate does not accurately check for missing_constant values #690

lylehuber opened this issue Aug 28, 2023 · 5 comments · Fixed by #692
Assignees
Labels
B14.0 bug Something isn't working

Comments

@lylehuber
Copy link

Checked for duplicates

No - I haven't checked

🐛 Describe the bug

The Missing_Constants class in the attached label seems to be formed correctly and matches the values in the attached file.
(Label and data file in tar-gz.) Validate is throwing the errors seen in the attached validation report.
constants.tar.gz
constants.txt

🕵️ Expected behavior

I expected [...]

📜 To Reproduce

...

🖥 Environment Info

  • Version of this software [e.g. vX.Y.Z]
  • Operating System: [e.g. MacOSX with Docker Desktop vX.Y]
    ...

📚 Version of Software Used

Validate-3.2.0

🩺 Test Data / Additional context

No response

🦄 Related requirements

🦄 #xyz

⚙️ Engineering Details

No response

@lylehuber lylehuber added bug Something isn't working needs:triage labels Aug 28, 2023
@al-niessner
Copy link
Contributor

al-niessner commented Aug 31, 2023

@jordanpadams @lylehuber

When I run it with code on main get different errors (below) but non of min/max errors because of fix #669

PDS Validate Tool Report

Configuration:
   Version                       3.3.0-SNAPSHOT
   Date                          2023-08-31T15:29:23Z

Parameters:
   Targets                       [file:/home/niessner/Projects/PDS/validate/src/test/resources/github690/rs_20160518_014000_udsc64_l3_e_v10.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      /home/niessner/Projects/PDS/validate/src/main/resources/util/registered_context_products.json



Product Level Validation Results

  FAIL: file:/home/niessner/Projects/PDS/validate/src/test/resources/github690/rs_20160518_014000_udsc64_l3_e_v10.xml
    Begin Content Validation: file:/home/niessner/Projects/PDS/validate/src/test/resources/github690/rs_20160518_014000_udsc64_l3_e_v10.tab
      ERROR  [error.table.bad_field_read]   data object Venus Climate Orbiter Akatsuki Radio Science (RS) Level 3 data, refractivity, bending angle, and impact parameter profile or index 1, record 1, field 8: Error while getting field value: Illegal embedded sign character
      ERROR  [error.table.records_mismatch]   data object Venus Climate Orbiter Akatsuki Radio Science (RS) Level 3 data, refractivity, bending angle, and impact parameter profile or index 1: Number of records read is not equal to the defined number of records in the label (expected 444, got 1).
    End Content Validation: file:/home/niessner/Projects/PDS/validate/src/test/resources/github690/rs_20160518_014000_udsc64_l3_e_v10.tab
        1 product validation(s) completed

Summary:

  2 error(s)
  0 warning(s)

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

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

  Message Types:
    1            error.table.records_mismatch
    1            error.table.bad_field_read

End of Report
Completed execution in 13618 ms

@lylehuber
Copy link
Author

The error message might be different but it's saying the same thing. The missing_constant value is a negative number and the listed valid_minimum is zero. Validate is going by the valid_minimum and saying that the negative sign is automatically an error without checking for the missing_constant value.

@al-niessner
Copy link
Contributor

@jordanpadams @lylehuber

It is not the same error nor the same cause. I do not understand PDS all that well and do not see where anything is declared a unsigned or positive but there is a check happening that is declaring the '-' sign as an illegal character. Is it possible that there is a positive/unsigned declaration that also applies to special constants? I can trace what validate is programmed to be "right" but it may not match the intent of the PDS documentation.

@lylehuber
Copy link
Author

Error as reported from Validate 3.2.0:
ERROR [error.table.field_value_out_of_min_max_range] data object 1, record 1, field 8: Field has a value '-9.999' that is less than the defined minimum value '0.0'.

Error as reported from Validate 3.3.0-SNAPSHOT:
ERROR [error.table.bad_field_read] data object Venus Climate Orbiter Akatsuki Radio Science (RS) Level 3 data, refractivity, bending angle, and impact parameter profile or index 1, record 1, field 8: Error while getting field value: Illegal embedded sign character

If you are not seeing that that is the same error, then I suggest that you have a private chat with Jordan and/or myself so that we can educate you about how this section of the label is to be interpreted.

@al-niessner
Copy link
Contributor

@jordanpadams @lylehuber

They are not the same. The first was a problem of testing min/max special constants despite being found as a previous special constant - well more specifically because the special constant was not being tested correctly. The bad sign, as it turns out, is because this particular way to express the special constant was not handled causing an exception to draw it to my attention to add the correct handling. Not the same error but they are the same in that they are erroneous to correct processing and required expansion with better examples. Fix is pending now that I have an example to write the correct handler. Thank you for the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B14.0 bug Something isn't working
Projects
None yet
3 participants