charm-tools
charm-tools copied to clipboard
`charm proof` should at least warn if metrics are defined but not collected
If a charm collects metrics (has a metrics.yaml
file) but does not actually collect them with a collect-metrics hook (no hooks/collect-metrics
), charm proof
should at least provide a warning.
Note that the hook could be a bespoke hook written by the charm author, or it could be added by a layer like layer:metrics
.
Just a reminder, a Warning from charm proof would prevent a charm from going into the store. I tend to agree with @cmars in this case if you are specifying metrics but do not have the hooks that seems wrong, I just want to make it clear that would fail a review where an Info message would not.
a Warning from charm proof would prevent a charm from going into the store
I've been able to push charms with warnings to jujucharms. I don't think we'd want to prevent that on a warning -- some charms are in development, and some warnings are to be taken as a matter of opinion (in my opinion).
Now, if you mean that a charm would not pass the standard charm review process with such a warning, that is ok.
That is what I meant. charm promulgate will not allow us to push a charm with warnings or errors.
This seems reasonable. I'll push a PR up shortly