Skip to content

[Task]: Patina component parameter validation changes #1122

@makubacki

Description

@makubacki

Feature Overview

Today, Patina component parameters are validated in debug builds (and unit tests) with debug assertions but not in release builds.

We're making a few changes to component parameter validation, some of which build on others, so they're collectively listed here.

  1. Remove debug asserts as a solution for component parameter validation error handling.
  2. Due to (1) and broader changes in the codebase to eliminate testing debug asserts in unit tests, do not test panics from debug asserts in unit tests
  3. Perform component parameter validation for Patina defined parameter types at compile-time
    • These are the most common types used and the most likely to be used incorrectly as new component authors will be using common, existing types, not defining new custom parameter types
  4. Continue to allow components to provide runtime validation of custom component parameter types
  5. Have custom component parameter type validation failures result in the component not being dispatched and the failure logged in the existing summary of components not dispatched in the log with the specific component parameter validation failure messages

Solution Overview

See above

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Labels

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions