Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JUJU-3999] Avoid parsing endpoint for overlay offers #887

Merged
merged 10 commits into from Jun 26, 2023

Conversation

cderici
Copy link
Member

@cderici cderici commented Jun 22, 2023

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:

 $ j offer grafana
ERROR endpoints must conform to format "<application-name>:<endpoint-name>[,...]"

unless, it's coming from a bundle overlay, such as:

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), 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

@cderici
Copy link
Member Author

cderici commented Jun 26, 2023

/merge

@jujubot jujubot merged commit 434a080 into juju:master Jun 26, 2023
5 of 7 checks passed
jujubot added a commit that referenced this pull request Jul 20, 2023
#920

## What's Changed
* Update readme and add some docstrings for functions by @cderici in #873
* Forward port subordinate utils by @cderici in #880
* [JUJU-3952] Revisit access control levels by @cderici in #882
* [JUJU-3999] Avoid parsing endpoint for overlay offers by @cderici in #887
* Forward port upgrade resource fixes in app refresh by @cderici in #889
* [JUJU-4076] Rename `wait_for_units` and make semantics clearer by @cderici in #890
* Stabilize sphinx build on RTD by @cderici in #899
* Move test utils into a separate module by @cderici in #903
* Remove title prefixes from issue templates by @cderici in #904
* [JUJU-4048] Use GetChangesMapArgs for bundle changes by @jack-w-shaw in #907
* Forward ports from 2.9 to 3.x by @cderici in #910
* Remove ceiling on pyyaml version by @cderici in #918

[JUJU-3952]: https://warthogs.atlassian.net/browse/JUJU-3952?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-3999]: https://warthogs.atlassian.net/browse/JUJU-3999?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-4076]: https://warthogs.atlassian.net/browse/JUJU-4076?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-4048]: https://warthogs.atlassian.net/browse/JUJU-4048?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error deploying a bundle with offers
4 participants