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

The configuredExpressions variable has wrong values quantity in case … #108

Merged

Conversation

radiovideo
Copy link

The configuredExpressions variable has wrong values quantity in case we want to validate same document more than two times with the different severity level.

Validation iterations:

  1. Use INFO level - configuredExpressions list has 180 elements.
  2. Use ERROR level - configuredExpressions list has 120 elements.
  3. Use INFO level again - configuredExpressions list has 120 elements. Not 180 as it was before ERROR.
    In this case we can add a new list as a local variable and add suitable ConfiguredExpressions to it for each validation process.

…we want to validate same document more than two times with the different severity level.

Validation iterations:
1) Use INFO level - configuredExpressions list has 180 elements.
2) Use ERROR or WARNING level - configuredExpressions list has 120 or 158 elements.
3) Use INFO level again - configuredExpressions list has 120/158 elements. Not 180 as it was before ERROR or WARNING.

Also, we have 180 expressions in the config file, but the "120" number is incorrect as well. We have only 98 errors, 158 error+warning, 180 total.
As a result we have less quantity of nodes being validated.

What was done:
- Migrate configuration bean from list to map
- Load and filter configuration lists while application starts
- Fix tests to be more relevant with preconditions

Area of code impacted:
- CodeValidatorApiConfiguration::vocabularyValidationConfigurations
- Fix fests

Side effect:
Performance boost as we do not need to filter configuration list for each validation request.

Tests:
dev local, code-validator unit tests, autotests
@radiovideo
Copy link
Author

Commit message on the visible place.

The configuredExpressions variable has wrong values quantity in case we want to validate the same document more than two times with the different severity levels.

Validation iterations:

  1. Use INFO level - configuredExpressions list has 180 elements.
  2. Use ERROR or WARNING level - configuredExpressions list has 120 or 158 elements.
  3. Use INFO level again - configuredExpressions list has 120/158 elements. Not 180 as it was before ERROR or WARNING.

Also, we have 180 expressions in the config file, but the "120" number is incorrect as well. We have only 98 errors, 158 error+warning, 180 total.
As a result, we have less quantity of nodes being validated.

What was done:

  • Migrate configuration bean from the list to map
  • Load and filter configuration lists while the application starts
  • Fix tests to be more relevant with preconditions

Area of code impacted:

  • CodeValidatorApiConfiguration::vocabularyValidationConfigurations
  • Fix fests

Side effect:
Performance boost as we do not need to filter the configuration list for each validation request.

Tests:
dev local, code-validator unit tests, autotests

@drbgfc drbgfc merged commit d8b3a74 into onc-healthit:fixSeverityLimiting Sep 23, 2021
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