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

docs: explicitly document that collect-status is is run on *every* hook #1399

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ops/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,10 @@ class CollectStatusEvent(LifecycleEvent):
way after the end of every hook, it should observe the
:attr:`collect_app_status <CharmEvents.collect_app_status>` or
:attr:`collect_unit_status <CharmEvents.collect_unit_status>` event,
respectively.
respectively. Note that observing the specific hook event is not required. For example, even
james-garner-canonical marked this conversation as resolved.
Show resolved Hide resolved
if you don't observe :attr:`config_changed <CharmEvents.config_changed>`, your collect status
observer will run at the end of every :attr:`config_changed <CharmEvents.config_changed>`
event, as well as all others.

The framework will trigger these events after the hook code runs
successfully (``collect_app_status`` will only be triggered on the leader
Expand Down
Loading