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-1836] Remove series from api params for deploy #14646

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

wallyworld
Copy link
Member

@wallyworld wallyworld commented Sep 22, 2022

Introduce a new OSVersion struct in the core/series package to hold an os name and versions.
When deploying a charm or adding a machine, update the facades to accept the OSVersion info, not series. For add charm, use the charm origin. The series param is kept for older clients and will be removed in juju 3.

The end goal is to avoid passing Series over the API. The next step is to look at return results and charm origin.

For now, the backend still stores series. So in the facade we convert OSVersion back to series. We want to get the api sorted first.

Checklist

  • Code style: imports ordered, good names, simple structure, etc
  • Comments saying why design decisions were made
  • Go unit tests, with comments saying what you're testing
  • [ ] Integration tests, with comments saying what you're testing
  • [ ] doc.go added or updated in changed packages

QA steps

bootstrap a 2.9 controller with this PR
use juju client to deploy a charm with --series and add a machine with --series
use a 2.8 client to do the same

repeat the above with a 2.8 controller

deploy this bundle

applications:
  juju-qa-test:
    charm: juju-qa-test
    channel: stable
    num_units: 2
  nrpe:
    charm: cs:nrpe-64
    channel: stable
  ntp:
    charm: cs:ntp-40
    channel: stable
    series: bionic
  telegraf:
    charm: cs:telegraf-37
    channel: stable
  ubuntu:
    charm: ubuntu
    series: xenial
    num_units: 2
relations:
- - ntp:juju-info
  - juju-qa-test:juju-info
- - ntp:juju-info
  - ubuntu:juju-info
- - nrpe:general-info
  - ubuntu:juju-info
- - telegraf:juju-info
  - ubuntu:juju-info

then edit the bundle to change ubuntu units

...
    num_units: 3
    to:
      - "lxd:new"

redeploy bundle

@wallyworld wallyworld force-pushed the osversion-deploy-params branch 4 times, most recently from 68fc990 to 5741c05 Compare September 22, 2022 11:16
Copy link
Member

@hmlanigan hmlanigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA of deploy charm found bugs, listed in the comments.

QA of deploy bundle worked until I deployed a bundle, added a new unit to "lxd:new", and ran again then hit the machine manager facade version issue seen deploying a charm.

Copy link
Member

@hmlanigan hmlanigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 conditional on fixing the test results and the renaming inside the OSVersion to match Base in the charmhub API pieces.

@wallyworld wallyworld force-pushed the osversion-deploy-params branch from 5741c05 to cde2897 Compare September 22, 2022 22:39
@wallyworld wallyworld force-pushed the osversion-deploy-params branch from cde2897 to 9371097 Compare September 22, 2022 22:44
@wallyworld
Copy link
Member Author

/merge

@wallyworld wallyworld changed the title Remove series from api params for deploy [JUJU-1836] Remove series from api params for deploy Sep 22, 2022
@jujubot jujubot merged commit 68045b3 into juju:2.9 Sep 22, 2022
@wallyworld wallyworld mentioned this pull request Sep 26, 2022
3 tasks
jujubot added a commit that referenced this pull request Sep 26, 2022
#14661

Merge 2.9

#14637
#14638
#14641
#14612
#14646
#14647
#14649
#14628
#14654

Conflicts
```
# Conflicts:
# apiserver/facades/client/application/deploy.go
# apiserver/facades/client/charmhub/charmhub_test.go
# apiserver/facades/client/charmhub/convert.go
# apiserver/facades/client/charms/conversions.go
# apiserver/facades/client/machinemanager/machinemanager.go
# apiserver/facades/client/machinemanager/machinemanager_test.go
# apiserver/facades/client/machinemanager/register.go
# apiserver/facades/client/resources/repository.go
# apiserver/facades/schema.json
# cmd/juju/application/deploy_test.go
# cmd/juju/application/deployer/bundlehandler.go
# cmd/juju/machine/add.go
# core/charm/strategies.go
# core/charm/strategies_test.go
# core/series/supportedseries.go
# core/series/supportedseries_test.go
# environs/manual/winrmprovisioner/provisioner_test.go
# rpc/params/applications.go
# rpc/params/params.go
# state/charm.go
# tests/includes/storage.sh
```

## 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/develop/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

See PRs
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.

3 participants