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

[DPE-5591] Rework status handling #141

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

[DPE-5591] Rework status handling #141

wants to merge 15 commits into from

Conversation

Batalex
Copy link
Contributor

@Batalex Batalex commented Oct 8, 2024

Changes:

  • Changed the way we set the unit status. Now, the unit status is evaluated in a post event hook handler and then set once per charm instantiation.
    I am pretty sure that the original issues come from rollingops setting the application status, whereas our event handlers only set the unit status. After a successful restart, the application status would be set to Active until a new event triggered the rollingsops libs. With these changes, the same method handles both the unit and the application status. The best thing, in my opinion, would be to avoid setting the app status everywhere (including the libs), but that's a discussion for another time.

  • Migrated all unit tests to scenario V7. I took this opportunity to properly patch sys calls triggering the auth desktop portal when running locally. Now we can run the tests without being interrupted.

  • Fixed an issue where we would silently ignore rebalance actions on non-leader units by moving the action event listener before the init early return

Pro tip: I recommend using the side-by-side display option for the units tests (instead of the default unified), I find it easier on the eyes to keep track of what changed regardless of the boilerplate.

@Batalex Batalex self-assigned this Oct 8, 2024
@Batalex Batalex marked this pull request as ready for review October 15, 2024 07:30
@Batalex Batalex requested review from marcoppenheimer and deusebio and removed request for marcoppenheimer October 15, 2024 11:25
src/charm.py Outdated Show resolved Hide resolved
src/events/broker.py Outdated Show resolved Hide resolved
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