Skip to content

cockpit-storage-integration: move storage check steps to custom hook with step handling #745

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

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Apr 1, 2025

No description provided.

@KKoukiou KKoukiou added no-test and removed no-test labels Apr 1, 2025
@KKoukiou KKoukiou force-pushed the disk-selection-set-race-backend-v2 branch from b097ea8 to 2df2529 Compare April 1, 2025 09:38
@KKoukiou KKoukiou changed the title Disk selection set race backend v2 cockpit-storage-integration: move storage check steps to custom hook with step handling Apr 1, 2025
@KKoukiou KKoukiou marked this pull request as ready for review April 1, 2025 10:37
KKoukiou added 2 commits April 1, 2025 12:44
Ensure the disk selection logic runs only once after re-scanning disks.
Previously, if the disk names changed (e.g., a new MD array name), the selection code
would re-run due to its dependency on `selectedDisks` inside `useEffect`.

To prevent this, get the selectedDisks from the API directly inside the useEffect to avoid
getting this from outside and causing useEffect re-runs.

Note: I created a followup ticket to re-approach how we do the storage checks
in this file: https://issues.redhat.com/browse/INSTALLER-4162, as I
realize this has grown out of its original architecture.

Resolves: rhbz#2354798
…with step handling

This ensures that steps are run only once.
@KKoukiou KKoukiou force-pushed the disk-selection-set-race-backend-v2 branch from 2df2529 to 211d902 Compare April 1, 2025 10:44
@KKoukiou KKoukiou requested a review from rvykydal April 1, 2025 12:56
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.

KKoukiou added 2 commits April 1, 2025 15:21
… destructive

Let it be called multiple times. Also do not perform any step when
storage is being fetched.
@KKoukiou KKoukiou force-pushed the disk-selection-set-race-backend-v2 branch from 40245c7 to fa61da7 Compare April 1, 2025 14:46
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 and better to me.

@KKoukiou KKoukiou merged commit cf4f8b7 into rhinstaller:main Apr 2, 2025
17 checks passed
@KKoukiou KKoukiou deleted the disk-selection-set-race-backend-v2 branch April 2, 2025 06:49
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