Turns out that model.uuid is None since the Environment is instantiated with a bare IP endpoint, and the model uuid is not passed in. The effect is the the charm is uploaded to the controller instead of the model. So it gets a valid charm-url back, but it's from the controller, not the model, so when you try to deploy that charm in the model, it's not found.
Totally not a bug in juju.
@katco, I'm sorry for wasting your time. Thanks for your patience and helpfulness.
Turns out that model.uuid is None since the Environment is instantiated with a bare IP endpoint, and the model uuid is not passed in. The effect is the the charm is uploaded to the controller instead of the model. So it gets a valid charm-url back, but it's from the controller, not the model, so when you try to deploy that charm in the model, it's not found.
Totally not a bug in juju.
@katco, I'm sorry for wasting your time. Thanks for your patience and helpfulness.