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

Make SUSE Manager section in Host Details page reactive #2593

Merged
merged 3 commits into from
May 7, 2024

Conversation

jamie-suse
Copy link
Contributor

@jamie-suse jamie-suse commented May 6, 2024

Description

This change adds the ability for Trento to send a WebSocket message to indicate that the software update discovery for a given host has been completed (HOST_SOFTWARE_UPDATES_DISCOVERY_COMPLETED).

When a client receives the HOST_SOFTWARE_UPDATES_DISCOVERY_COMPLETED message, the client then requests the software updates settings information, and then also requests the software updates of a given host.

How was this tested?

  • Added checks to ensure that the new WebSocket message is being sent.
  • Added tests for the new Redux Saga to ensure the correct behaviour.

@jamie-suse jamie-suse added enhancement New feature or request javascript Pull requests that update Javascript code elixir Pull requests that update Elixir code labels May 6, 2024
@jamie-suse jamie-suse self-assigned this May 6, 2024
@jamie-suse jamie-suse changed the title Make Software Updates settings data reactive Make SUSE Manager section in Host Details page reactive May 6, 2024
Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

Good job!

We just need to leverage SoftwareUpdatesDiscoveryEventHandler event handler and do relevant things when specific other relevant things happen 😄

Besides this, what happens when a host gets deregistered or settings are cleared?
We might want that reactiveness also in these cases.

lib/trento/software_updates/discovery.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.

LGTM, great work!

Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

Alright, great improvements 🚀

It would be great avoiding unnecessary requests to the APIs, but I guess we can just go with this now.
We at least have a saner behavior, now.

@jamie-suse jamie-suse merged commit 437bb22 into main May 7, 2024
26 checks passed
@jamie-suse jamie-suse deleted the reactive-sw-updates branch May 7, 2024 12:24
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 javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

None yet

3 participants