Skip to content

monitoring: allow validation errors to aggregate and return all at once

Created by: bobheadxi

This change allows all validation errors to be collected in a multierror and be returned all together, so that we can see everything that's wrong. Also refactors error handling in the generator to return errors instead of logging and returning, because large multierror output looks terrible with structured logging.

That said, output is still a bit funky because nested multi-errors don't format correctly right now: https://github.com/sourcegraph/sourcegraph/issues/31497

Test plan

sg generate go ./monitoring

With an added validation https://github.com/sourcegraph/sourcegraph/pull/36423 :

image

Merge request reports

Loading