Megawatcher doesn't return charms


#1

When connecting to the Juju API and requesting the model state using the AllWatcher facade next method. Relations, annotations, machines, applications, and units are returned but charms are not.

To deploy an application a charm first needs to be added to a model, while this is idempotent it would be nice if we didn’t have to make a potentially superfluous AddCharm call or a separate manual Charms List call.

Was this simply an oversight or was it done intentionally?


#2

Juju deploy workflow is to first add a charm and then create an application record referencing that charm. I’m guessing the watcher behaviour may have been based on that - it’s a really old bit of code. But I can’t see why charms could not be added to the watcher.