Activity log for bug #2039267

Date Who What changed Old value New value Message
2023-10-13 10:23:01 Jack Shaw bug added bug
2023-10-13 10:23:23 Jack Shaw bug added subscriber Heather Lanigan
2023-10-13 10:23:30 Jack Shaw removed subscriber Heather Lanigan
2023-10-13 10:24:46 Jack Shaw description Reproduced in 2.9 and 3.3 juju refresh help text states ``` Please note that --switch is dangerous, because juju only has limited information with which to determine compatibility; the operation will succeed, regardless of potential havoc, so long as the following conditions hold: - The new charm must declare all relations that the application is currently participating in. - All config settings shared by the old and new charms must have the same types. ``` Juju also sometimes verifies the charm names in metadata match However, no such validations take place ``` $ juju deploy ch:ubuntu $ mkdir ubuntu $ juju download ubuntu --filepath ubuntu/ubu.charm $ cd ubuntu $ unzip * (edit config.yaml such that) $ cat config.yaml options: hostname: type: int default: 0 description: Override hostname of machine, when empty uses default machine hostname $ cd .. $ juju refresh ubuntu --switch ./ubuntu Added local charm "ubuntu", revision 14, to the model (success!) ``` Note, the above fill fail if you change the name of your local charm. However: ``` $ juju deploy zookeeper --channel 3 $ juju refresh zookeeper --switch landscape-server --channel stable ``` will succeed Reproduced in 2.9 and 3.3 juju refresh help text states ``` Please note that --switch is dangerous, because juju only has limited information with which to determine compatibility; the operation will succeed, regardless of potential havoc, so long as the following conditions hold: - The new charm must declare all relations that the application is currently   participating in. - All config settings shared by the old and new charms must   have the same types. ``` Juju also sometimes verifies the charm names in metadata match. However, I do not believe this is documented However, no such validations take place ``` $ juju deploy ch:ubuntu $ mkdir ubuntu $ juju download ubuntu --filepath ubuntu/ubu.charm $ cd ubuntu $ unzip * (edit config.yaml such that) $ cat config.yaml options:   hostname:     type: int     default: 0     description: Override hostname of machine, when empty uses default machine hostname $ cd .. $ juju refresh ubuntu --switch ./ubuntu Added local charm "ubuntu", revision 14, to the model (success!) ``` Note, the above will correctly fail if you change the name of your local ubuntu charm. However: ``` $ juju deploy zookeeper --channel 3 $ juju refresh zookeeper --switch landscape-server --channel stable ``` will incorrectly succeed, according to this (undocumented?) feature
2023-10-13 10:25:42 Jack Shaw juju: assignee Jack Shaw (jack-shaw)
2023-10-13 10:33:14 Jack Shaw summary Juju refresh --switch does no validation Juju refresh --switch does not validate correctly/consistently
2023-10-19 10:30:39 Vitaly Antonenko juju: status New Triaged
2023-10-19 10:30:53 Vitaly Antonenko juju: importance Undecided High