-
Notifications
You must be signed in to change notification settings - Fork 102
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
Means to wait for an app to really be removed #656
Labels
priority/low
low priority
Comments
I feel like this might be useful for more than just the remove, thanks for the suggestion! |
cderici
added a commit
to cderici/python-libjuju
that referenced
this issue
Apr 6, 2022
jujubot
added a commit
that referenced
this issue
Apr 19, 2022
#665 #### Description This is to make life easier by allowing the following pattern: ```python await ops_test.model.applications[related_app.name].remove() # Block until it is really gone. Added after an itest failed when tried to redeploy: # juju.errors.JujuError: ['cannot add application "related-app": application already exists'] await ops_test.model.block_until(lambda: related_app.name not in ops_test.model.applications) ``` to be written as: ```python await ops_test.model.remove_application(related_app.name, block_until_done=True) ``` Fixes #656 #### QA Steps ```sh tox -e integration -- tests/integration/test_application.py::test_app_remove_wait_flag ``` #### Notes & Discussion Another option would be to do `await ops_test.model.applications[related_app.name].remove(block_until_done=True)`, however, then it gets weird to ask the `app.model` to `block_until` the `app.name` is no longer in `model.applications` while the `app` object is being torn down.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awaiting
Application.remove
does not guarantee the application is "fully" removed: when I try to deploy the same app after it is removed, I getjuju.errors.JujuError: ['cannot add application "related-app": application already exists']
.Currently I use this pattern:
It would be handy if, for example,
Application.remove
took a bool flag such aswait_for_removal
.The text was updated successfully, but these errors were encountered: