handling of series when resolving charm urls

Bug #1788604 reported by Francesco Banconi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Eric Claude Jones

Bug Description

When deploying a charm without specifying a series and a revision, juju adds the model default series first and then uses the charm store for resolving the revision.
So for instance, having a bionic,xenial charm at revision 1 and then a bonic only one at revision 2 results in revision 1 to be deployed on 2.4.1 by default, which can be surprising, as not specifying the series is often intended as "just give me latest stable, I don't care about the series".
So, what would you think of changing the url resolving logic so that the model's default-series is only used for disambiguation, when the latest stable supports multiple series?

Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.5-beta1
Changed in juju:
assignee: nobody → Richard Harding (rharding)
Changed in juju:
milestone: 2.5-beta1 → 2.5-beta2
Revision history for this message
Eric Claude Jones (ecjones) wrote :

Hey Francesco,

How are you? Has there been any agreement as to what the default behavior should be? If I understand correctly you are suggesting that the latest revision's series take precedence over the model's default series.

Revision history for this message
Richard Harding (rharding) wrote : Re: [Bug 1788604] Re: handling of series when resolving charm urls

Yes, I think that this is true. If the series isn't specified by the
operator at deploy time, and the charm prefers something else, I think
going with the charm author is suggesting is a safe bet. Since there's no
method for a model to not have a default series, it's basically always
overriding what the charm author suggests and so there's no method to rely
on the charm's preference.

On Mon, Nov 26, 2018 at 9:56 AM Eric Claude Jones <
<email address hidden>> wrote:

> Hey Francesco,
>
> How are you? Has there been any agreement as to what the default
> behavior should be? If I understand correctly you are suggesting that
> the latest revision's series take precedence over the model's default
> series.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1788604
>
> Title:
> handling of series when resolving charm urls
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1788604/+subscriptions
>

Revision history for this message
Eric Claude Jones (ecjones) wrote :

Hey Francesco,

While implementing your requested solution is fairly simple, I'd like to test the case you mention specifically. To do that I would need a charm that drops support for a series. Do you know of a charm that drops support for a series from one revision to the next or do you have reproduction steps for your case?

I am also assuming that in your hypothetical example above the model's default-series is set to 'xenial'. Is that assumption correct?

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

Hey Eric,

the jujushell charm did that:

(dev) ~ % charm show '~juju-gui/jujushell'
allow shell access to one's juju model through a web interface

Name jujushell
Owner juju-gui
Revision 15
Supported Series bionic
Tags ops
Subordinate false
Promulgated false
Home page https://github.com/juju/jujushell-charm
Bugs url https://github.com/juju/jujushell-charm/issues
Read juju-gui, everyone
Write juju-gui

CHANNEL CURRENT
stable true

(dev) ~ % charm show '~juju-gui/jujushell-14'
allow shell access to one's juju model through a web interface

Name jujushell
Owner juju-gui
Revision 14
Supported Series bionic, xenial
Tags ops
Subordinate false
Promulgated false
Home page https://github.com/juju/jujushell-charm
Bugs url https://github.com/juju/jujushell-charm/issues
Read juju-gui, everyone
Write juju-gui

CHANNEL CURRENT
stable true

And yes I the default-series was xenial.

Changed in juju:
assignee: Richard Harding (rharding) → Eric Claude Jones (ecjones)
status: Triaged → In Progress
Revision history for this message
Eric Claude Jones (ecjones) wrote :
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.5-beta2 → 2.5-beta3
Changed in juju:
milestone: 2.5-beta3 → 2.5-rc1
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
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.