validator-labs / validator

validator monitors ValidationResults created by one or more validator plugins and uploads them to a configurable sink.
https://validator-labs.github.io/docs
Apache License 2.0
17 stars 3 forks source link

🌱 Run validations in parallel when executing `validator rules check` #397

Open ahmad-ibra opened 2 months ago

ahmad-ibra commented 2 months ago

Summary

Currently all the direct rule validations run in sequence. The problem with this is that if any rule in particular takes a long time to finish, this will cause a delay in processing (emitting to sink, writing to disk, and printing) all validations.

Instead consider running each plugins validations in a goroutine. The goroutines can then put their validation results in a channel. As the validationResults are read from the channel, they can be emitted to a sink, written to disk, and printed. This will also ensure we process validation results as they complete rather than waiting for all validation results to be ready before reporting on the first result.

complexconst commented 2 months ago

Can you assign me this issue ?

TylerGillson commented 2 months ago

Hi @complexconst! We'd love your contribution for this issue. Excited to see you here 😄