Skip to content

Conversation

@ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Jul 9, 2025

Includes:

  • Merging master (there were relevant aesthetic changes there)
  • Changes in the behavior, labels and texts when defining partitions and space policy
  • Removed the now useless useLongestDiskTitle
  • Redefine the fields displayed on the device selector (hopefully @dgdavid can improve the look & feel).

This is how it looks without mocking in a system where the model of the disks can be read

real

This is mocked with some MD RAIDs

mock_raid

This is mocked with multipath (long names)

mock_multipath

jreidinger and others added 30 commits June 18, 2025 14:17
## Problem

The package is not available for s390x and ppc64le archs (it was added
by agama-project#2487)

## Solution

Add the package only on x86_64 and aarch64.
Installing on iSCSI was not working because some iSCSI steps were
missing:

* Start iSCSI services in the live media.
* Copy iSCSI configs to the target system.
* Enable iSCSI services in the target system.   

https://bugzilla.suse.com/show_bug.cgi?id=1243973
To avoid code repetition with styles and possibly other stuff in the
future. The same look&feel is already used in two other places.
Now users of web interface can bind a connection to an specific network
interface by its name or MAC address, or allow the connection to be
applied to any interface (not bind).
Adds unit tests that identified and helped fix two main issues:
- Missing default values for device selectors when a connection has
  bindings to keep the internal form state in sync with user interface.
- Existing connection options were not fully preserved during update,
  potentially causing data loss.

Also adds basic documentation for the component.
To add coverage to the mode initialization.
By using a helper method for retrieving form options
Do not rely on the system defaults, they are different
in openSUSE and SLE.
Agama-weblate commit: b914a8a851ecb468d089c9bd3471dc83775060be
imobachgs and others added 7 commits July 10, 2025 13:29
The space policy ID is no longer needed, as it can be derived from the
given drive. It was previously used to force the "keep" summary in an
unlikely edge case, but that scenario is now handled differently by
duplicating the string to keep the utility method cleaner.
## Problem

- The product definitions contain some incorrect product names
- The openSUSE Leap product has been renamed from `openSUSE` to `Leap`
(since Leap 15.3)
  - Similarly for LeapMicro there is `Leap-Micro` product
- And there actually is `Kalpa` product in the Tumbleweed OSS
repository, so let's use it

## Solution

- Fixed the installed base product names for Kalpa, Leap 16.0 and
Leap-Micro 6.2 distributions.
Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

I have done a first review of your commits only. Everything looks good, but I'm postponing the approval for a final review when the PR is actually marked ready for review.

device,
...props
}: ChangeDeviceMenuItemProps): React.ReactNode => {
const onlyOneOption = UseOnlyOneOption(modelDevice);
Copy link
Contributor

Choose a reason for hiding this comment

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

NP: not part of your changes and probably simply a typing mistake, but we usually use PascalCase for components, not for hooks. I.e., should be useOnlyOneOption or not use use prefix if it is not a hook.


// If the target device cannot be changed, this button will always be disabled and would only
// provide redundant information.
if (UseOnlyOneOption(device)) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! looks like UseOnlyOneOption is not a hook. So, we need better name for it *plus go for camelCase since it is not a component either. Again, I'm completely aware that this is not part of your work here.

dgdavid and others added 2 commits July 10, 2025 16:54
Previously, tests for DriveEditor were failing due to overmocking used
Drives, specifically the isReusingPartitions attribute. This attribute
is derived from partitions, so mocking it directly led to
inconsistencies, especially with stricter typing aimed at making tests
more robust.

An earlier fix removed the unnecessary isReusingPartitions mock, relying
instead on properly mocking partitions. However, using
Partial<model.Drive> alone didn’t fully solve the problem. It just
shifted TypeScript's complaints elsewhere.

To address this more effectively by now, the partial-mock dev dependency
has been added, which allows for cleaner and safer partial mocks. This
approach avoids overmocking while preserving type safety. A
dependency-free solution may be explored later, ideally when there’s
time to revisit and refine the overall test suite strategy.

Reference:

  * https://dev.to/thekashey/partial-how-not-to-mock-the-whole-world-32pj
  * https://github.com/theKashey/partial-mock
@ancorgs ancorgs force-pushed the storage-selector-ancor branch 4 times, most recently from 153d019 to a4fa333 Compare July 10, 2025 22:48
@ancorgs ancorgs force-pushed the storage-selector-ancor branch from a4fa333 to 9071a38 Compare July 10, 2025 22:55
imobachgs and others added 10 commits July 11, 2025 07:56
…ama-project#2553)

## Problem

As described in agama-project#2539, `agama generate` exports missing hostname and
localization settings as as `null`.

## Solution

Stop exporting those options as they are optional.

## Testing

- Tested manually
Typing drives in DriveEditor became problematic due to excessive
mocking. Partial mocking was attempted without success, possibly due to
how the buildThing methods work in the storage layer (see previous
commits). As a result, typing for drives has been removed in some tests,
and a few @ts-expect-error directives were added.

The current test setup patterns need a more robust design to support
typing without excessive mocking, especially in the storage area where
proper mocking is difficult without defeating the purpose of the _model_
and _buildThing_ methods. However, tackling this properly would require
significant effort and is deferred to avoid blocking ongoing work.
## Problem

The current Driver Update Disk mechanism does not handle kernel modules
(drivers) updates.

- [PED-3670](https://jira.suse.com/browse/PED-3670)
- [AGM-158](https://jira.suse.com/browse/AGM-158)

## Solution

Add a new mechanism to update the kernel modules of the live media.

When you include kernel modules in a driver update, you can optionally
add a `module.order` file that determines in which order the modules
should be loaded. Check [mkdud
howto](https://github.com/openSUSE/mkdud/blob/master/HOWTO.md) for
further information.

The DUD mechanism will work in the following way:

- Copy the modules to the live medium (under
`/sysroot/lib/modules/KERNEL-RELEASE/kernel`), unloading if possible to
old ones.
- Unload all the kernel modules listed in the `module.order` file (if it
exist).
- Copies the `module.order` file to
(`/sysroot/etc/modules-load.d/99-agama.conf`) to make sure they are
loaded first when pivoting.

## Testing

- *Tested manually*

# Documentation

- https://confluence.suse.com/display/YAST/Driver+Update+Disks+support
- A public document in our website is still pending.
@ancorgs ancorgs marked this pull request as ready for review July 14, 2025 08:06
@ancorgs ancorgs merged commit 20108a4 into agama-project:storage-selector Jul 14, 2025
11 checks passed
@imobachgs imobachgs mentioned this pull request Jul 21, 2025
imobachgs added a commit that referenced this pull request Jul 21, 2025
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.