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

collect_*_status and lifecycle events #1079

Closed
PietroPasotti opened this issue Nov 23, 2023 · 2 comments · Fixed by #1080
Closed

collect_*_status and lifecycle events #1079

PietroPasotti opened this issue Nov 23, 2023 · 2 comments · Fixed by #1080
Labels
blocked Blocked on another team/project/item

Comments

@PietroPasotti
Copy link
Contributor

logically, collect_status is a lifecycle event, aka framework event, since it's not 'custom' in the way user-defined events are, and it is emitted by the framework on itself whether the user wants it or not, quite like commit/pre-commit.

At the moment we log their emission as custom event which is somewhat misleading and complicates jhack tail's life when attempting to distinguish them from 'true' custom events.

I propose we make CollectStatusEvent a LifecycleEvent subclass, and we uniformly start logging all LifecycleEvents so jhack tail can pick them up if the user wants to see them (but they will be hidden by default as they are generally speaking not interesting and would clutter the output).

@PietroPasotti
Copy link
Contributor Author

see #1080 for an implementation proposal

only doubt I have is whether that is 'too much logging', as it's basically three lines we're adding to each charm execution for (most of the time) no true value.

I doubt whether knowing about pre-commit/commit will ever be valuable (unless, like some actually do, the charm relies on them for control flow!, but then they can log it themselves.)
However knowing about collect-status, I expect, will be more interesting.

@PietroPasotti
Copy link
Contributor Author

Could also considering special-casing collect status events and only logging them, skipping other lifecycle events.

@benhoyt benhoyt added the blocked Blocked on another team/project/item label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another team/project/item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants