I know what you’re thinking: “Luca, I can just charmcraft release my-charm --channel ...
, why would I need anything else”; well, here’s why!
Manual promotions have some issues
There are a few issues with manually promoting a charm from a channel to another:
- we don’t have
charmcraft promote
yet, so you need to:- run
charmcraft status
to figure out which revision is in which channel - run
charmcraft release
for the actual promotion (be careful with typos!) - repeat that for every base and architecture
- run
- there’s no traceability for who and when promoted what:
- your manager asks in the team chat to promote
cool-charm
from latest/candidate to latest/stable - you see the message after a couple of hours: has anyone done it? Should you do it?
- have fun asking all the people in the team to figure it out
- your manager asks in the team chat to promote
This process is very error-prone: you made a typo in the revision number when releasing to stable? Enjoy explaining that to customers!
The automated way
There’s a new charming-action to promote charms now!
This allows you to promote a charm from a channel to another channel; the promotion will happen for all bases and all architectures, so you don’t have to worry about anything!
To use it, just make a workflow like the one we have here. Give it a try!
Taking it a step further
In the Observability team, we currently promote all of our charms, on a cadence, to the next risk track (i.e., we shift edge → beta → candidate → stable). Imagine doing the process I described above, repeated for ~20 charms, on multiple architectures, every two weeks: it’s about
20 repos * 2 bases * (3 channels + 1 status) = 160 commands
With the promote-charm action, we reduced it to about (20 repos * 3 promotions =) 60 manual clicks, but isn’t that still very boring?
That’s why I made the promote train action: this automates all of what I just described, so that now we only have to do one, error-free, click.