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

feat: add support for ActionEvent.id #103

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

tonyandrewmeyer
Copy link
Collaborator

@tonyandrewmeyer tonyandrewmeyer commented Feb 16, 2024

Sets JUJU_ACTION_UUID when handling an action event, so that ops sets ActionEvent.id appropriately. The ID is loaded from state.next_action_id and set on the state.Action object, similarly to relations.

Also stops setting JUJU_ACTION_NAME outside of action events - mostly to simplify the code addition, but in my quick checks this is the case in Juju as well.

Fixes #101

Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

couple of minor suggestions, but it looks good!
One more note, you should bump the minor in pyproject.toml if you want the CI to trigger a release.

scenario/runtime.py Outdated Show resolved Hide resolved
scenario/sequences.py Show resolved Hide resolved
scenario/state.py Outdated Show resolved Hide resolved
tests/test_e2e/test_actions.py Show resolved Hide resolved
Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

thanks a bunch!

@PietroPasotti PietroPasotti merged commit 94ff159 into canonical:main Mar 1, 2024
2 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the actionevent-id-101 branch March 3, 2024 22:57
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.

Add .id to ActionEvents
2 participants