-
Notifications
You must be signed in to change notification settings - Fork 68
Changes on the storage-selector branch #2547
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
Changes on the storage-selector branch #2547
Conversation
## 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
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.
This reverts commit fe4e023.
## 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.
dgdavid
left a comment
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.
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); |
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.
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; |
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.
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.
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
153d019 to
a4fa333
Compare
a4fa333 to
9071a38
Compare
…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.
Implements code-o-o#leap/features#218 Related pattern https://build.opensuse.org/package/show/home:lkocman:branches:X11:xfce/patterns-xfce
## 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.
Prepare to release Agama 17: * #2459 * #2492 * #2526 * #2527 * #2528 * #2529 * #2530 * #2531 * #2532 * #2533 * #2534 * #2536 * #2537 * #2538 * #2540 * #2541 * #2542 * #2543 * #2544 * #2545 * #2546 * #2547 * #2548 * #2550 * #2551 * #2553 * #2554 * #2555 * #2556 * #2557 * #2558 * #2559 * #2560 * #2561 * #2562 * #2563 * #2564 * #2565 * #2566 * #2567 * #2568 * #2570 * #2571 * #2572 * #2575 * #2576 * #2577 * #2579 * #2580 * #2583 * #2584 * #2585 * #2586 * #2587 * #2588 * #2589 * #2591
Includes:
useLongestDiskTitleThis is how it looks without mocking in a system where the model of the disks can be read
This is mocked with some MD RAIDs
This is mocked with multipath (long names)