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

Deploy by revision on 2.9 #957

Merged
merged 10 commits into from
Oct 13, 2023
Merged

Deploy by revision on 2.9 #957

merged 10 commits into from
Oct 13, 2023

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Oct 5, 2023

Description

This backports the support for deploy by revision from master branch (3.x track) (#830) onto the 2.9 track.

QA Steps

So we have 1 example and 2 integration tests for this, all of them should work well (I tested it against 2.9.45 on lxd).

 $ python examples/deploywithrevision.py
tox -e integration -- tests/integration/test_model.py::test_deploy_by_revision
tox -e integration -- tests/integration/test_model.py::test_deploy_by_revision_validate_flags

All the rest of the CI tests need to pass.

Notes & Discussion

JUJU-4716

by passing the revision info through the ResolveCharm api call.

fixes juju#690
This is needed because in libjuju we default to latest/stable if no
channel is specified. It is dangerous if we don't add this check
because without it the libjuju would deploy the wrong revision without
an exception if --revision is used but no --channel is given.
Otherwise fail early without making any additional API calls.
that deploys juju-qa-test --channel 2.0/stable --revision 22
without the --revision parameter this will deploy rev 21, but with the
parameter it will deploy 19.
flags are validated before deploying charms or bundles
@cderici cderici added enhancement hint/2.9 going on 2.9 branch labels Oct 5, 2023
@cderici cderici requested review from anvial and jack-w-shaw October 5, 2023 20:39
@jack-w-shaw jack-w-shaw self-assigned this Oct 6, 2023
Copy link
Member

@jack-w-shaw jack-w-shaw left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

rename to deploy_with_revision.py

juju/model.py Outdated Show resolved Hide resolved
@cderici
Copy link
Contributor Author

cderici commented Oct 13, 2023

/merge

@jujubot jujubot merged commit 4fcebc2 into juju:2.9 Oct 13, 2023
9 checks passed
@cderici cderici mentioned this pull request Oct 26, 2023
jujubot added a commit that referenced this pull request Oct 26, 2023
#979

## What's Changed
* Deploy by revision on 2.9 by @cderici in #957
* Application refresh with resources by @cderici in #960
* Improve jujudata to find controller name by endpoint by @cderici in #964
* Allow switch kwarg in refresh to switch to local charms by @jack-w-shaw in #968
* Parse charm URLs consistantly for local charms by @jack-w-shaw in #969
* Fix juju config directory location pointed by XDG_DATA_HOME by @cderici in #975
* [JUJU-4779] Switch to local properly by @jack-w-shaw in #977

#### Notes & Discussion

JUJU-4850

[JUJU-4779]: https://warthogs.atlassian.net/browse/JUJU-4779?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hint/2.9 going on 2.9 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants