You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #887 from cderici/avoid-parsing-endpoint-for-overlay-offers
#887
#### Description
This is an addendum PR on #817, that attempts to fix#816.
So the main thing here is that we don't accept endpoints that are not in `"<application-name>:<endpoint-name>[,...]"` format, like:
```sh
$ j offer grafana
ERROR endpoints must conform to format "<application-name>:<endpoint-name>[,...]"
```
unless, it's coming from a bundle overlay, such as:
```yaml
description: Another overlay to create an offer
applications:
grafana:
offers:
dashboards:
endpoints:
- dashboards
```
Pylibjuju already has the necessary mechanism that passes along the application name and offer name etc from a bundle/overlay ([here](https://github.com/juju/python-libjuju/blob/ad62156b3bd18c949cd7f65a6b528cbaf023e121/juju/bundle.py#L1041)), this PR is a small change that adjusts the `controller.create_offer` (that actually calls the `ApplicationOffersFacade.Offer`) to not parse the endpoint to get the `offer_name` and `application_name` (that the function parameters are overriding anyways).
Fixes#816
#### QA Steps
#817 already adds a test that demonstrates the error, this PR extends that to also check for the offer in the model. So the following should pass:
```
tox -e integration -- tests/integration/test_model.py::test_deploy_bundle_with_multiple_overlays_with_include_files
```
0 commit comments