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

Clear suma discovery domain #2393

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

nelsonkopliku
Copy link
Member

@nelsonkopliku nelsonkopliku commented Mar 7, 2024

Description

This PR introduces domain logic to handle clearing up of software updates discovery results.
Basically when a user clears up suma credentials, whatever has been previously discovered, gets ignored.
Specifically the health of the software updates discovery gets ignored from the host's aggregated health.

This is going to happen in a loop for all the hosts meaning that a bunch of HostHealthChanged could be emitted upon creds clear up, with related ui notifications.

We could avoid these possibly many extra events by changing the aggregated health of a host silently when SoftwareUpdatesDiscoveryCleared, but meh... the host's health does change and it'd feel like we'd be missing something in the history.

How was this tested?

Automated tests

@nelsonkopliku nelsonkopliku self-assigned this Mar 7, 2024
@nelsonkopliku nelsonkopliku added enhancement New feature or request elixir Pull requests that update Elixir code labels Mar 7, 2024
Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

LGTM

I was thinking maybe we could leverage already existing events but in the end it doesn't matter and when having events involved shortcuts fall short pretty quickly 👍

@nelsonkopliku nelsonkopliku merged commit 441ee32 into main Mar 7, 2024
32 checks passed
@nelsonkopliku nelsonkopliku deleted the clear-suma-discovery-domain branch March 7, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elixir Pull requests that update Elixir code enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants