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

Validation issue filtering options #310

Merged
merged 3 commits into from
May 13, 2024
Merged

Conversation

javagl
Copy link
Contributor

@javagl javagl commented May 13, 2024

When validating a tileset with many contents, then the glTF-Validator will be applied to each content. Depending on the nature of the glTF files, this may cause a lot of noise. For example, when the glTF files contain certain extensions that are not handled by the glTF validator, then this will usually cause ...

  • WARNING: "Extension uses unreserved extension prefix..."
  • INFO: "Cannot validate an extension as it is not supported by the validator..."
  • INFO: "This object may be unused..." (when the extension defines its own data objects)

for each and every content.

The ValidationResult.filter function (as described in the README) already offers some options for filtering validation results post-hoc. However, there is currently no way to define fine-grained filtering options directly at the command line. Such filters might be arbitrarily complex, and therefore, there will hardly be a way to squeeze these into configuration- or option files (except for some simple, special cases) - and even less, define them at the command line.

However, there are some ways of how one could reduce the amount of noise here, with relatively little effort.

This PR currently implements an additional ValidationOption property caled contentValidationIssueSeverity. This defines a filter criterion for the CONTENT_VALIDATION_[INFO/WARNING/ERROR] family of issues that is applied during the validation itself. This validation option can (like all validation options) be part of an "options file" that is passed in at the command line.

For example, with
npx ts-node ./src/main.ts --tilesetFile "C:\Data\tileset.json" --optionsFile gltfSilencingOptions.json
and a file gltfSilencingOptions.json that just contains

{
  "contentValidationIssueSeverity": "ERROR"
}

the validator will no longer include content validation INFO- or WARNING issues in the result.


One could consider more fine-grained control here. For example, users might wish to filter out certain issues from the glTF-Validator in particular, based on the type that the issues have there. For example, they might want to filter out only BUFFER_VIEW_INVALID_BYTE_STRIDE issues or so. This is currently not possible (and would require a few structural changes), because these types are not preserved: The 3D Tiles validator defines its own set of "issue types", and does not pass through these types (so they are all converted into CONTENT_VALIDATION_[INFO/WARNING/ERROR] issues internally)


Note: This PR does two things to reduce the noise that are unrelated to the content validation issue filtering:

  • It disables the "Missing optional extension" log output from glTF-Transform
  • It adds "empty" validators for the NGA_gpm, MAXAR_extent, and MAXAR_grid 3D Tiles extensions, meaning that the presence of these extensions will no longer cause any issues to be reported

@lilleyse lilleyse merged commit 88f0e0f into main May 13, 2024
2 checks passed
@lilleyse lilleyse deleted the validation-issue-filtering-options branch May 13, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants