DevOps-MBSE / AaC

Prototype Arch-as-Code
https://devops-mbse.github.io/AaC/
MIT License
27 stars 7 forks source link

💭 [REQUEST] - Validator 3.0 #684

Closed jondavid-black closed 6 months ago

jondavid-black commented 1 year ago

Reference Issues

681

671

This is a blocker for #675

Summary

As an AaC developer, I want to simplify the modeling, creation, and usage of validators so that plugin development is simpler.

An expected advantage would be the elimination of duplicated validation execution and an increase in runtime performance.

AC:

Basic Example

The context validator would be very similar to the existing validators but would not provide a unit under test in the execution api. The root_keys validator is probably a good example of a context validator and would require only minimal updates.

The schema validator is really just the validator we currently use. The required_fields validator is a good example of this.

The primitive validator is going to be similar to existing primitive validators. The validators under primitive_type_check are example of this.

The validator definition will be changed to not use behavior explicitly, but will contain many of the same behavior fields. Each validator should be stand-alone, and not have a list of potential behavior defined in the model. While the idea of reuse was good here, it doesn't align as well as it could with how validators work in the AaC system.

What are the drawbacks/impacts of your feature request?

No drawbacks/impacts are currently known. There are no validator developers outside the AaC team, so nobody should be impacted. We will have to update the 3rd party plugin once this is completed.

Unresolved questions

There's been good discussion here, so I don't believe we have any unresolved questions at this time.

jondavid-black commented 12 months ago

I made some progress on this, but it has kind of exploded. One thing just keeps leading to the next. It got to the point that I abandoned the branch and started working a new internal API to make some of this workable. Details are in #691.

lizzcondrey commented 8 months ago

Believe the majority, if not all, of this got incorporated within the 0.4.0 rebaseline effort as seen in PR #714 , so this task should be able to be closed once that PR has been merged.

lizzcondrey commented 6 months ago

714 was completed and merged in, the requests outlined above were all met in that new baseline effort. Closing this request.