Old bundle identifiers broken

Bug #1429129 reported by Richard Harding
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-quickstart
Fix Released
High
Francesco Banconi

Bug Description

https://github.com/CanonicalLtd/jujucharms.com/issues/55

WIth Juju Quickstart 2.0.0 existing command lines that worked with the previous version now fall over

⟫ juju-quickstart bundle:~landscape/landscape-dense-maas/landscape-dense-maas
WARNING:root:this bundle URL is deprecated: please use the new format: u/landscape/landscape-dense-maas-landscape-dense-maas
usage: juju-quickstart [-h] [-e ENV_NAME] [-n BUNDLE_NAME] [-i]
                       [--environments-file ENV_FILE]
                       [--gui-charm-url CHARM_URL] [--no-browser]
                       [--distro-only] [--ppa] [--version] [--debug]
                       [--description] [--upload-tools]
                       [--upload-series UPLOAD_SERIES]
                       [--constraints CONSTRAINTS]
                       [BUNDLE]
juju-quickstart: error: unable to open the bundle: cannot retrieve bundle from remote URL https://api.jujucharms.com/charmstore/v4/~landscape/bundle/landscape-dense-maas-landscape-dense-maas/archive/bundle.yaml: Not Found

Whilst I understand that such identifiers are deprecated, my expectation is that they should still work.

I'm also unsure if the new format that quickstart is suggesting is correct, jujucharms.com suggests it's `juju quickstart u/landscape/landscape-dense-maas/8`

Tags: landscape
Revision history for this message
Richard Harding (rharding) wrote :

The old bundle: format should reach out to the v3 api and still be supported. That will work until we EOL the v3 api at the end of the year. So this is a bug on quickstart and we'll look to move this issue over there for updating. Thanks for reporting this.

Revision history for this message
Francesco Banconi (frankban) wrote :

This happens in the cases an old bundle repo did not include more than one bundle in the old-style YAML.
The legacy bundle ingestion works like this:
- if a basked includes multiple bundles, the resulting v4 bundle name is {basket-name}-{bundle-name} for each {bundle-name};
- if a basket only includes one bundle, the v4 bundle is just {basket-name}.
Quickstart always assume the former case, and that's why "bundle:~landscape/landscape-dense-maas/landscape-dense-maas" is translated as "u/landscape/landscape-dense-maas-landscape-dense-maas" and not just "u/landscape/landscape-dense-maas".

This means the translation cannot be done without communicating with the charm store (which is nice in the currrent impl).
One approach could be to
1) first check if the charm store includes a {basket-name}-{bundle-name} bundle. If not, fall back to {basket-name}.

Note that the current ingestion logic is prone to name clashes, so we should either fix it or move on and drop support for ingesting old-style bundles asap.

tags: added: landscape
Revision history for this message
Richard Harding (rharding) wrote :

Thanks Francesco, the plan is sound and we'll start working on fixing that asap followed up by a release asap.

Changed in juju-quickstart:
assignee: nobody → Francesco Banconi (frankban)
description: updated
Changed in juju-quickstart:
status: Triaged → In Progress
Changed in juju-quickstart:
status: In Progress → Fix Committed
Changed in juju-quickstart:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.