google / slo-generator

SLO Generator computes SLIs, SLOs, Error Budgets and Burn Rates from supported backends, then exports an SLO report to supported targets.
Apache License 2.0
470 stars 75 forks source link

Add a YAML/JSON validator #41

Open bkamin29 opened 3 years ago

bkamin29 commented 3 years ago

Have a tool/function to valide the good schema of SLO_CONFIG_FILE and ERROR_BUDGET_POLICY_FILE And use it on CICD

ocervell commented 3 years ago

Will look into it - it would be bit complex to validate every 'measurement' section for every backend/exporters, but we could use Yamale or something similar to validate the main schema.

bkamin29 commented 3 years ago

Will look into it - it would be bit complex to validate every 'measurement' section for every backend/exporters, but we could use Yamale or something similar to validate the main schema.

yes, it's enough !

ocervell commented 3 years ago

Moving this to v3as we can validate schemas automatically using the OpenSLO (oslo) tool - which requires us to move to OpenSLO specification beforehand.

lvaylet commented 8 months ago

Hi @bkamin29, is this feature still of interest to you?

bkamin29 commented 8 months ago

Yes :)

lvaylet commented 8 months ago

Ideally, what is the expected behavior in a CI pipeline? Is it an extra command (for example slo-generator validate ...) that you can call on its own, that returns a non-zero status code if there is an error and stops the pipeline? Or do you want this validation to happen when the files are actually loaded? If the latter, what is the expected behavior from the SLO Generator?