cronitorio / cronitor-python

Python client for Cronitor
MIT License
73 stars 9 forks source link

validate_config swallows exceptions #19

Closed bchopson closed 2 years ago

bchopson commented 2 years ago

I was planning to add config validation as a pre-deploy step for my app. However, validate_config swallows exceptions and doesn't return a status. Would you accept a pull request to either remove the error suppression, or to return a boolean value from validate_config?

aflanagan commented 2 years ago

Hi @bchopson, thanks for bringing this up! Ultimately, we made a design decision that we didn't want Cronitor be the source of any deployment failures - i.e. if something goes wrong in the validate_config or apply_config call, we didn't want to halt a deploy.

That said, I do really like the idea of having validate_config return a boolean based on whether it validated correctly or not. We'd be happy to accept a pull request for that!

aflanagan commented 2 years ago

@bchopson I've included this in the 4.6.0 release as well!