In application.py there exists the local_refresh method which allows for upgrading a charm from the filesystem. Unfortunately, this method does not allow for a series to be specified. Instead it uses the bundle.py get_charm_series method, which simply opens the metadata.yaml file and returns the first series found in the list. As there can be multiple series present, the first one present might not match the series of the unit to which the application is deployed, resulting in an error.
There should be a method to specify the series when executing local_refresh.
In application.py there exists the
local_refreshmethod which allows for upgrading a charm from the filesystem. Unfortunately, this method does not allow for a series to be specified. Instead it uses the bundle.pyget_charm_seriesmethod, which simply opens the metadata.yaml file and returns the first series found in the list. As there can be multiple series present, the first one present might not match the series of the unit to which the application is deployed, resulting in an error.There should be a method to specify the series when executing
local_refresh.