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

Change host's health based on software updates discovery result #2368

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

nelsonkopliku
Copy link
Member

@nelsonkopliku nelsonkopliku commented Feb 28, 2024

Description

This PR adds the domain logic to handle software updates discovery.

  • a new event SoftwareUpdatesDiscoveryCompleted is emitted containing the discovered relevant patches counts. Needed to properly update aggregate state and opens the possibility to project such data if needed and to possibly broadcast via websockets interesting information that might be useful for the UX.
  • based on what has been discovered also a HostHealthChanged event might be emitted

I think we might need extra domain interactions related to software updates discovery business process that would allow us to answer the following:

  • what happens when a user clears up suma settings? should we invalidate latest discovery data and ignore it in host's aggregated health?
  • if we don't do anything when clearing up settings, we might wait for the watch process ™️ next tick, however also in that case we need to decide what to do if a discovery had previously ran, but now we do not have settings anymore.

How was this tested?

Automated tests added.

@nelsonkopliku nelsonkopliku self-assigned this Feb 28, 2024
@nelsonkopliku nelsonkopliku force-pushed the suma-based-host-health-change branch 2 times, most recently from daf1103 to 3bc128f Compare February 28, 2024 15:20
@nelsonkopliku nelsonkopliku marked this pull request as ready for review February 28, 2024 15:40
@nelsonkopliku nelsonkopliku added enhancement New feature or request user story elixir Pull requests that update Elixir code labels Feb 28, 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.

Just a tiny change request, I think it would simplify the tests as well, let me know what do you think. Great job, keep it up!

lib/trento/hosts/host.ex Outdated Show resolved Hide resolved
lib/trento/hosts/host.ex Outdated Show resolved Hide resolved
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.

You have my sword

@nelsonkopliku nelsonkopliku merged commit 0e5a547 into main Feb 29, 2024
24 checks passed
@nelsonkopliku nelsonkopliku deleted the suma-based-host-health-change branch February 29, 2024 12:17
@jamie-suse
Copy link
Contributor

gimli

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 user story
Development

Successfully merging this pull request may close these issues.

None yet

3 participants