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

chore: Use Ops.CollectStatus Event #33

Closed
wants to merge 1 commit into from

Conversation

gatici
Copy link
Contributor

@gatici gatici commented Nov 24, 2023

Description

This PR uses new ops feature CollectStatus Event to manage status Charm. Event named "collect_unit_status" sets the status of charm automatically at the end of every hook.

Reference:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have bumped the version of the library

@gatici gatici requested a review from a team as a code owner November 24, 2023 13:14
Signed-off-by: gatici <gulsum.atici@canonical.com>
@gatici gatici force-pushed the TELCO-881-use-ops-CollectStatus branch from dda5145 to b32baf6 Compare November 27, 2023 12:37
@gatici gatici requested a review from benhoyt November 27, 2023 14:56
Copy link

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Looks good. However, I would have expected tests to be updated with Harness.evaluate_status()?

Note also @gruyaume's comment here are probably waiting for the relation-broken fix in ops: canonical/sdcore-amf-k8s-operator#53 (comment)

@gatici
Copy link
Contributor Author

gatici commented Nov 28, 2023

Looks good. However, I would have expected tests to be updated with Harness.evaluate_status()?

Note also @gruyaume's comment here are probably waiting for the relation-broken fix in ops: canonical/sdcore-amf-operator#53 (comment)

https://juju.is/docs/sdk/scenario is used instead of Harness in unit tests. Hence, the unit tests are all valid without any modification.

@gatici gatici marked this pull request as draft November 28, 2023 07:56
@gatici gatici closed this Mar 12, 2024
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.

2 participants