Leftover from porting k8s implementation: it was assumed that workload_version file matched the currently installed workload. This is true for k8s, where workload + charm code are upgraded together, but not true for VM (where charm code upgraded on all units at once, then workload upgraded by us in charm code)
Impact: incorrect workload version in status message if snap not upgraded
Solution
Save workload_version value in unit databag when saving snap revision
Issue
Leftover from porting k8s implementation: it was assumed that
workload_version
file matched the currently installed workload. This is true for k8s, where workload + charm code are upgraded together, but not true for VM (where charm code upgraded on all units at once, then workload upgraded by us in charm code)Impact: incorrect workload version in status message if snap not upgraded
Solution
Save
workload_version
value in unit databag when saving snap revision