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-4076] Rename wait_for_units and make semantics clearer #890

Merged
merged 4 commits into from
Jun 27, 2023

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Jun 26, 2023

Description

This is to clear a bit the semantics of wait_for_units parameter in model.wait_for_idle, which is to wait for a certain amount of units across all the given applications and return when those are available, regardless of the state of the other units (they can be in an error state or whatever just don't care and return)

Fixes #886

QA Steps

We got a couple of tests specific to wait_for_idle and wait_for_units, so all of them should pass, some important ones are the following:

tox -e py3 -- tests/unit/test_model.py::TestModelWaitForIdle
tox -e integration -- tests/integration/test_model.py::test_wait_for_idle_with_enough_units
tox -e integration -- tests/integration/test_model.py::test_wait_for_idle_with_exact_units
tox -e integration -- tests/integration/test_model.py::test_wait_for_idle_with_exact_units_scale_down
tox -e integration -- tests/integration/test_model.py::test_wait_for_idle_with_exact_units_scale_down_zero

cderici added 3 commits June 26, 2023 10:18
to make the semantics of `wait_for_units` explicit, which is to wait
for a certain amount of units across all the given applications and
return when those are available, regardless of the state of the other
units (they can be in an error state or whatever just don't care and
return)

Fixes juju#886
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

@cderici
Copy link
Contributor Author

cderici commented Jun 26, 2023

/merge

@cderici
Copy link
Contributor Author

cderici commented Jun 26, 2023

/build

@cderici
Copy link
Contributor Author

cderici commented Jun 27, 2023

/merge

@jujubot jujubot merged commit c7d0a10 into juju:master Jun 27, 2023
jujubot added a commit that referenced this pull request Jul 20, 2023
#920

## What's Changed
* Update readme and add some docstrings for functions by @cderici in #873
* Forward port subordinate utils by @cderici in #880
* [JUJU-3952] Revisit access control levels by @cderici in #882
* [JUJU-3999] Avoid parsing endpoint for overlay offers by @cderici in #887
* Forward port upgrade resource fixes in app refresh by @cderici in #889
* [JUJU-4076] Rename `wait_for_units` and make semantics clearer by @cderici in #890
* Stabilize sphinx build on RTD by @cderici in #899
* Move test utils into a separate module by @cderici in #903
* Remove title prefixes from issue templates by @cderici in #904
* [JUJU-4048] Use GetChangesMapArgs for bundle changes by @jack-w-shaw in #907
* Forward ports from 2.9 to 3.x by @cderici in #910
* Remove ceiling on pyyaml version by @cderici in #918

[JUJU-3952]: https://warthogs.atlassian.net/browse/JUJU-3952?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-3999]: https://warthogs.atlassian.net/browse/JUJU-3999?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-4076]: https://warthogs.atlassian.net/browse/JUJU-4076?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-4048]: https://warthogs.atlassian.net/browse/JUJU-4048?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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.

wait_for_idle returns prematurely when wait_for_units is provided
3 participants