-
Notifications
You must be signed in to change notification settings - Fork 297
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
Fixes #36789 - Add actions to force applicability refresh #10757
Fixes #36789 - Add actions to force applicability refresh #10757
Conversation
Issues: #36789 |
so I can get rid of the stupid menu when you click it
d7ea735
to
ee15098
Compare
rebased after merging #10756 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great! We'll probably want to make sure that there's some documentation around this change at Katello 4.11 release time.
Is it okay to assume that users will have remote execution set up? The applicability calculation button is sorta useless now since we always update applicability unless there is some error, so I think it's okay. Just makes me wonder if users are going to miss the old button for whatever reason.
I think it's somewhat safe to assume that REX is present, since it's now the only way to patch hosts with Katello and is included by default with Satellite. I suppose I could make sure to hide the actions if REX isn't enabled; let me know if you want me to add that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremylenz after some thought I think this is good as-is. Mind just putting in a request for a docs update to warn that server-side applicability calcs are going hammer-only? Probably a release note. I can't believe that that button is useful for anyone anymore, especially after the move to Pulp 3.
Goes with theforeman/foreman#9847
What are the changes introduced in this pull request?
Until now, the 'Recalculate' button on the Errata tab only did the server-side recalculation. This means that if you've changed the host content view, content overrides, etc. it might use an out-of-date installed package list to calculate applicability.
See https://community.theforeman.org/t/list-of-packages-to-install-not-up-to-date/35153
In this PR, we add new kebab actions to the host details page:
The button will do the same thing in all four places - run 'subscription-manager repos' on the host via REX. This will also trigger (as it always has) errata applicability recalculation, and the web UI will be updated immediately.
Considerations taken when implementing this change?
Turns out the hardest part of this was getting the main kebab menu to close when you click on it. Never woulda thought. (See the linked PR) I considered several solutions including Redux and slot and fill, but the React context solution I arrived at seems the most elegant.
On the ErrataTab, the new action replaces the "Recalculate" action, which used to just do the server-side recalculation. We thought this is what most users would want, since recalculating without refreshing the host's installed package list is only useful in certain situations.
Server-side-only recalculation will still be available via Hammer. (maybe we should also make that available as a host bulk action in the new UI)
What are the testing steps for this pull request?
Check out theforeman/foreman#9847 in Foreman
Get REX working on at least one host
Test the recalculate action in all three places
Make sure everything works