Uploaded image for project: 'anaconda installer'
  1. anaconda installer
  2. INSTALLER-4162

[webui] Refactor storage integration logic: Improve step execution and maintainability

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • 25Q2
    • None
    • None

      The current logic in src/components/storage/CockpitStorageIntegration.jsx for handling storage operations before returning to installation is fragile and overly complex. These operations include:

      • Re-scanning devices
      • Unlocking LUKS devices
      • Resetting selected disks with MD arrays
      • Creating partitioning if mount points are present

      Currently, these steps are executed inside multiple useEffect hooks, guarded by a checkStep variable. However, there is no strict mechanism to ensure each step runs only once, making the approach unreliable. Additionally, the component code has grown excessively large, exceeding what a React component should manage.

      Goal:

      • Refactor the logic to ensure steps are executed exactly once when needed.
      • Improve maintainability by moving storage-related logic out of the React component.
      • Make execution flow more predictable and avoid unnecessary re-renders.

      Acceptance Criteria:

      • Each step runs only once when required.
      • The logic is moved to a separate module or custom hook.
      • The React component remains responsible only for rendering and state management.

              kkoukiou Katerina Koukiou
              kkoukiou Katerina Koukiou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: