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-1705] Make sure the action status is correctly set #753

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Oct 21, 2022

Description

This fixes the way we set the status of an action that's ran on a unit. Previously only the action.output was being returned and the actual status of the action was being retrieved from the self.data[] (as the Action object is a modelEntity), which is not reliable at the moment. This PR changes it to get it directly from the Action object returned by the Juju API when the action completes (with either completed or failed) status. So it should be completely accurate all the time.

Fixes #719

QA Steps

Following should pass %100.

tox -e integration -- tests/integration/test_unit.py::test_run

Copy link
Contributor

@juanmanuel-tirado juanmanuel-tirado left a comment

Choose a reason for hiding this comment

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

LG2M

Small but relevant fix.

@addyess
Copy link
Contributor

addyess commented Oct 21, 2022

first glance shows this works for the very simple test i proposed in #719

juju/action.py Outdated Show resolved Hide resolved
@cderici cderici force-pushed the fix-unit-action-run-status branch from 340b6a0 to 83519c6 Compare October 21, 2022 19:03
@cderici
Copy link
Contributor Author

cderici commented Oct 21, 2022

/merge

@jujubot jujubot merged commit 6d81ce6 into juju:master Oct 21, 2022
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.

awaited juju Actions that are complete or failed, don't reflect that status
4 participants