Skip to content

storage: avoid rendering wizard pages while Cockpit Storage is active #758

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Apr 4, 2025

Rendering wizard pages in the background can trigger API calls to devices that may no longer exist, leading to errors.
We currently work around this by handling and silencing these errors [1] as a hotfix for Fedora 42, due to limited time to implement a proper fix.

This change takes first steps to a more robust approach by preventing the rendering of wizard pages entirely while cockpit-storage mode is active, avoiding invalid device accesses altogether.

[1] 53f2ff

@KKoukiou KKoukiou force-pushed the show-storage-convervative branch 2 times, most recently from bb6fabb to 7951d55 Compare April 4, 2025 09:31
@KKoukiou KKoukiou marked this pull request as draft April 4, 2025 10:52
Rendering wizard pages in the background can trigger API calls to devices that may no longer exist,
leading to errors.
We currently work around this by handling and silencing these errors [1] as a hotfix for Fedora 42,
due to limited time to implement a proper fix.

This change takes first steps to a more robust approach by preventing the rendering of wizard pages
entirely while cockpit-storage mode is active, avoiding invalid device accesses altogether.

[1] rhinstaller@53f2ff
@KKoukiou KKoukiou force-pushed the show-storage-convervative branch from 7951d55 to 45ae6e6 Compare May 14, 2025 08:24
@KKoukiou KKoukiou marked this pull request as ready for review May 14, 2025 10:23
@KKoukiou KKoukiou requested a review from rvykydal May 14, 2025 10:23
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @KKoukiou - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -71,7 +71,6 @@ const InstallationScenarioSelector = ({
idPrefix,
isFormDisabled,
setIsFormValid,
showStorage,
Copy link

Choose a reason for hiding this comment

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

question (bug_risk): Removed showStorage guard; ensure side effects are controlled

Without showStorage’s guard, ensure useEffect dispatches don’t fire unexpectedly when cockpit storage mode toggles.

Copy link
Contributor

@rvykydal rvykydal left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Do we also want to remove the work around? Or would it be done later on?

@KKoukiou
Copy link
Contributor Author

Looks good to me. Do we also want to remove the work around? Or would it be done later on?

Removing the workaround needs more work. I was experimenting in #754 for that, I might get back to that next week.

@KKoukiou KKoukiou merged commit b3087e6 into rhinstaller:main May 15, 2025
10 checks passed
@KKoukiou KKoukiou deleted the show-storage-convervative branch May 15, 2025 10:00
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