[2.7.1] metric keys from metrics.yaml are not validated at deployment time

Bug #1863367 reported by Dmitrii Shcherbakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

A charm is possible to deploy with invalid metrics.yaml:

metrics:
  dead=beef=cafe:
    type: gauge
    description: Some strange metric

As far as I can tell, only basic YAML key validation is done by the YAML parser
https://github.com/juju/charm/blob/v6/metrics.go#L78-L120

Relevant discussion:
https://github.com/canonical/operator/pull/140#discussion_r379481923

I have not found any specific documentation on the format of metric keys but there doesn't seem to be a regex for them in the juju/charm package.

description: updated
description: updated
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: metrics
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.