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 3.5.0-SNAPSHOT attempts to look at all files, not just *.xml #854

Closed
kbowley-asu opened this issue Mar 13, 2024 · 7 comments · Fixed by #859
Closed

validate 3.5.0-SNAPSHOT attempts to look at all files, not just *.xml #854

kbowley-asu opened this issue Mar 13, 2024 · 7 comments · Fixed by #859
Assignees
Labels

Comments

@kbowley-asu
Copy link

kbowley-asu commented Mar 13, 2024

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

When I use validate 3.5.0-SNAPSHOT to validate a bundle with pds4.bundle, I noticed that it prints Error messages that looks like it's checking EVERY file to see if it's a label and not just *.xml and *.XML as it claims it is using for in file filters. It doesn't include these messages in a report when writing to a report file, but it does fill the terminal with a lot of confusing messages similar to the following:
Error on line 1 column 1 of NAC_ANAGLYPH_M1101296365_M1101289222.BROWSE.PNG: SXXP0003 Error reported by XML parser: Invalid byte 1 of 1-byte UTF-8 sequence.

🕵️ Expected behavior

I expected validate to just look at the files that it claims to be looking at and not whine about the files that it shouldn't be looking at not being a label.

📜 To Reproduce

  1. validate a bundle with -R pds4.bundle
  2. watch the error messages roll across the screen
    ...

🖥 Environment Info

  • Version of this software [3.5.0-SNAPSHOT]
  • Operating System: Linux with openjdk 11.0.19

📚 Version of Software Used

No response

🩺 Test Data / Additional context

No response

🦄 Related requirements

No response

⚙️ Engineering Details

No response

I&T

TestRail Test ID: T8833815

@kbowley-asu
Copy link
Author

Make that openjdk 17.0.9 ( I really should pay attention which terminal I'm using to get information)

@jordanpadams
Copy link
Member

@kbowley-asu looks like this was introduced via this update: #822 . We will investigate how we can support both.

@jordanpadams
Copy link
Member

If you output the report to a file (--report-file), this should provide a clean report for you to sift through.

@al-niessner
Copy link
Contributor

@jordanpadams

Do you understand these two lines:

if (!"PDS4 Directory".equalsIgnoreCase(getContext().getRule().getCaption())) {
fileFilter = new WildcardOSFilter(Arrays.asList(new String[] {"*"}));

I get the Java meaning but I have no idea what is so special about PDS4 Directory. It seems that this check needs to be changed to either --allow-unlabeled-files or something else. Maybe register target needs a check for spurious files in which is tries to skip the forced reading of files as XML. Again not sure because I do not understand the intent of the check.

@jordanpadams
Copy link
Member

@al-niessner It looks like it is just doing something special when is gets to a directory per this pds4.folder validation rule, I think it just says "crawl for everything" when someone uses that rule. But I think yo umay be right that we need to add an additional check before we read files to see if they are XML or LBLX first

@edguinness
Copy link

I am seeing the same issue on Windows 10 with Java 11.0.21. Here is a small part on the command window output. The report says that the bundle validated with no errors.

Q:\stage\VikingLander\validation>validate -D -v2 -C catalog_v02.xml -R pds4.bundle -r rocks_laptop.txt -t Q:\stage\VikingLander\PDS4\urn-nasa-pds-vl_rocks
Error on line 1 column 1 of readme.txt:
SXXP0003 Error reported by XML parser: Content is not allowed in prolog.
Error on line 1 column 1 of readme.txt:
SXXP0003 Error reported by XML parser: Content is not allowed in prolog.
Error on line 1 column 1 of viking_lander_rock_dataset.txt:
SXXP0003 Error reported by XML parser: Content is not allowed in prolog.
Error on line 1 column 1 of viking_lander_rock_dataset.txt:
SXXP0003 Error reported by XML parser: Content is not allowed in prolog.
Error on line 1 column 1 of viking_lander_1_host.txt:

@jordanpadams
Copy link
Member

@edguinness @kbowley-asu this is up next for a fix, but our developer is working on another critical item at this time.

for now, you can treat these messages as noise in the logs. Sorry for the inconvenience.

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