(see #120 for a different approach to this problem. The current attempt is taking a simpler implementation with the knowledge that we likely wont maintain this charm much in future)
The current charm does not pin the snap installed, instead installing it from latest/stable. This means that the snap version may float, potentially to a backwards incompatible version, without any intervention from the user.
The goals here are to:
ensure the snap version installed is "held" (not upgraded on the fly during operation, without the admin asking for it). That way someone in the obs team pushing a new latest/stable cannot break existing deployments of the charm
define what snap version any specific charm revision uses, making deployment predictable and reproducible (if someone deploys charm rev1 today and gets snap revA, they should get that same snap revA when they deploy again tomorrow, in a month, in a year, etc)
Solution
This PR pins the snap to a specific revision by adding:
the revision of the snap to be installed (for amd or arm) in the charm.py file
tooling to install the snaps in the manifest, including setting snap refresh --hold=forever for any snap that is pinned to a revision
tests for above
Testing Instructions
CI coverage should handle testing. If testing manually, you can juju ssh into the grafana-agent unit and check snap info grafana-agent, which should pin to revisionn 16 and say the snap has a "hold".
Issue
(see #120 for a different approach to this problem. The current attempt is taking a simpler implementation with the knowledge that we likely wont maintain this charm much in future)
The current charm does not pin the snap installed, instead installing it from
latest/stable
. This means that the snap version may float, potentially to a backwards incompatible version, without any intervention from the user.The goals here are to:
latest/stable
cannot break existing deployments of the charmSolution
This PR pins the snap to a specific revision by adding:
snap refresh --hold=forever
for any snap that is pinned to a revisionTesting Instructions
CI coverage should handle testing. If testing manually, you can
juju ssh
into the grafana-agent unit and checksnap info grafana-agent
, which should pin to revisionn 16 and say the snap has a "hold".Upgrade Notes
Todo: