forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#16101 from jack-w-shaw/JUJU-4465_use_base_in_…
…NewCharmAtPath juju#16101 Replace it with BaseSelector This is part of the ongoing task to replace series with base In most places, BaseSelector and SeriesSelector behave the same. There are a few notable exceptions. BaseSelector prefers the latest LTS over the charm's default, which results in some unit test failures. Also, as a flyby, change NewCharmAtPath to use a base instead of a series ## Checklist - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing - [ ] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing - [ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages ## QA steps Ensure all unit tests pass ``` ./main.sh -v -c aws -p ec2 deploy ./main.sh -v -c aws -p ec2 refresh ``` ``` $ juju deploy ubuntu ubu1 Deployed "ubu1" from charm-hub charm "ubuntu", revision 24 in channel stable on ubuntu@22.04/stable $ juju deploy ubuntu ubu2 --base ubuntu@20.04 Deployed "ubu2" from charm-hub charm "ubuntu", revision 24 in channel stable on ubuntu@20.04/stable $ juju model-config default-base=ubuntu@20.04 $ juju deploy ubuntu ubu3 Deployed "ubu3" from charm-hub charm "ubuntu", revision 24 in channel stable on ubuntu@20.04/stable ``` Deploy some bundles as follows: ``` $ cat bundle1.yaml applications: ubu1: charm: ubuntu num_units: 1 $ juju deploy ./bundle1.yaml Located charm "ubuntu" in charm-hub, channel stable Executing changes: - upload charm ubuntu from charm-hub with architecture=amd64 - deploy application ubu1 from charm-hub using ubuntu - add unit ubu1/0 to new machine 1 Deploy of bundle completed. $ juju status Model Controller Cloud/Region Version SLA Timestamp m2 lxd localhost/localhost 3.3-beta2.1 unsupported 12:38:46+01:00 App Version Status Scale Charm Channel Rev Exposed Message ubu1 waiting 0/1 ubuntu stable 24 no waiting for machine Unit Workload Agent Machine Public address Ports Message ubu1/0 waiting allocating 1 waiting for machine Machine State Address Inst id Base AZ Message 1 pending pending ubuntu@22.04 ``` ``` $ cat bundle2.yaml applications: ubu1: charm: ubuntu base: ubuntu@20.04 num_units: 1 $ juju deploy ./bundle2.yaml Located charm "ubuntu" in charm-hub, channel stable Executing changes: - upload charm ubuntu from charm-hub for base ubuntu@20.04/stable with architecture=amd64 - deploy application ubu1 from charm-hub on ubuntu@20.04/stable using ubuntu - add unit ubu1/0 to new machine 0 Deploy of bundle completed. ``` ``` $ cat bundle3.yaml default-base: ubuntu@20.04 applications: ubu1: charm: ubuntu num_units: 1 $ juju deploy ./bundle3.yaml Located charm "ubuntu" in charm-hub, channel stable Executing changes: - upload charm ubuntu from charm-hub for base ubuntu@20.04/stable with architecture=amd64 - deploy application ubu1 from charm-hub on ubuntu@20.04/stable using ubuntu - add unit ubu1/0 to new machine 0 Deploy of bundle completed. ```
- Loading branch information
Showing
42 changed files
with
466 additions
and
1,017 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.