correction - The bug is in the bundle deploy code, not the async charm download.
When deploying a charm individually, AddCharm is called multiple times, as well hit the already downloaded piece of the async charm download. Thus this issue doesn't reproduce outside of a bundle (and the terraform provider).
When deploying a bundle, the changes are reviewed, a common charm found with different application names and we only AddCharm once. Previously when synchronous charm download, the charm's id could be put into the all of the application's charm-orgin because the ID was known before the applications were added to juju by the bundle.
correction - The bug is in the bundle deploy code, not the async charm download.
When deploying a charm individually, AddCharm is called multiple times, as well hit the already downloaded piece of the async charm download. Thus this issue doesn't reproduce outside of a bundle (and the terraform provider).
When deploying a bundle, the changes are reviewed, a common charm found with different application names and we only AddCharm once. Previously when synchronous charm download, the charm's id could be put into the all of the application's charm-orgin because the ID was known before the applications were added to juju by the bundle.