canonical / grafana-agent-operator

This charmed operator automates the operational procedures of running Grafana Agent, an open-soruce telemetry collector.
https://charmhub.io/grafana-agent
Apache License 2.0
4 stars 8 forks source link

feat: pin snap revision, add metadata to control snaps (simplified approach) #131

Closed ca-scribner closed 1 week ago

ca-scribner commented 3 weeks ago

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:

Solution

This PR pins the snap to a specific revision by adding:

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".

Upgrade Notes

Todo:

sed-i commented 3 weeks ago

I prefer this to #120.