Skip to content

chore: merge master into storage-config-ui#1926

Merged
dgdavid merged 55 commits intostorage-config-uifrom
storage-config-ui-sync-master-20250121
Jan 21, 2025
Merged

chore: merge master into storage-config-ui#1926
dgdavid merged 55 commits intostorage-config-uifrom
storage-config-ui-sync-master-20250121

Conversation

@dgdavid
Copy link
Contributor

@dgdavid dgdavid commented Jan 21, 2025

Keep the feature branch in sync with master.

g7 and others added 30 commits January 15, 2025 17:55
yast packages should be installed per package and not as
a whole pattern.

Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
## Problem

- https://bugzilla.suse.com/show_bug.cgi?id=1235827

This help output has a typo "te" next to a grammar mistake:

> qa2-141-81:~ # agama profile import --help
> ...
> Arguments:
>   <URL>
> Profile's URL. Supports the same schemas than te "download" command
plus AutoYaST specific
> ones. Supported files are json, jsonnet, sh for Agama profiles and
ERB, XML, and
>           rules/classes directories for AutoYaST support
>  

## Solution

Fix typo. Note that it looks like code comment, but the CLI library
shows it to the user.

## Testing

Rare case where I dare admit no testing

## Screenshots

No
## Problem

patterns-yast is not available in SLFO/SLE16.

## Solution

~~Added a requirement for the pattern only when using the openSUSE,
openSUSE-PXE, Leap and Leap-PXE profiles.~~

As suggested by Josef below, dropped it entirely on openSUSE as well as
the whole pattern shouldn't be installed at all.
## Problem

If something goes wrong during packages installation, Agama web UI does
not show any message. We
found out that there are some problems:

- When the connection goes down, TanStack Query will not perform any
request (until the network is
  up).
- The UI might loose the `QuestionsChanged` event if it is reconnecting
the WebSocket at that point.

## Solution

To overcome those problems, we have introduced the following changes:

- Set TanStack Query [network
mode](https://tanstack.com/query/v5/docs/framework/react/guides/network-mode)
to "always" when running on localhost.
- Invalidate `questions` query when the WebSocket is reconnected to make
sure we do not miss any
  message.

> [!NOTE]
> We could play with the `refetchOnReconnect` setting at global level.
But let's be conservative at
> this point.

## Additional changes

`agama-web-server`:

- Exit the WebSocket handler when the client is disconnected
- Log the events

`web UI`:

- **refactor(web): expose onerror and onclose at WSClient level**

## Testing

- _Tested manually_

## Screenshots

![Error message from
libzypp](https://github.com/user-attachments/assets/66808bc4-0b0d-4b3d-b64d-7d642ba9af9e)
## Problem

When selecting SLES4SAP product it won't find base product.


## Solution

After rename also base product is changed from SLES-SAP to SLES_SAP, so
update base product entry.


## Testing


- *Tested manually*

Please note that for testing manually SCC still after registration
returns old Alpha repo which missing system_installation fix and also
old SLES-SAP product. For this reason I used for testing
agama.install_url pointing to the latest internal products repo and skip
registration ( so scc repos is not used ).
## Problem

- A different product is installed in the target system than selected
initially
- https://bugzilla.suse.com/show_bug.cgi?id=1235931

## Details

- The product was selected but later a reset was called so the selection
was lost
- Then the solver selected a random product to satisfy the dependencies

## Solution

- Just select the product later, after resetting the selection

## Testing

- Tested manually, it fixes t he problem
Made adjustments to support an acceptable layout for actions on the
product selection page. This change is expected to be temporary until
the migration to PatternFly 6 is completed, at which point the entire
page will be revamped.
Still pending retrieving the license to display it in the dialog open
when user clicks on the license link.
Apart from displaying only available languages, still pending interface
improvements and unit tests.
dgdavid and others added 21 commits January 18, 2025 22:48
Agama-weblate commit: 118c829f082da156f1a45847bad46911fff13cdd
Agama-weblate commit: 118c829f082da156f1a45847bad46911fff13cdd
…the SLES product to give the admin the chance to get a minimal preparation of the operating system to run SAP workloads on plain SLES.
Add pattern sles_minimal_sap to the user selectable patterns list of the
SLES product to give the admin the chance to get a minimal preparation
of the operating system to run SAP workloads on plain SLES.


## Problem

Today the customer can not prepare the SLES operating system during
installation for running SAP workloads, so he will run into installation
and performance issues later during the SAP workload installation and
runtime.


## Solution

Add a pattern to the user pattern list, which the user can select for
SAP Server preparation during the installation.
Updating the service translation files from the agama-weblate repository
Updating the web translation files from the agama-weblate repository
They were there just for testing purposes.
## Problem

Agama does not show the license of any product and does not ask the user
to accept it. This is a requirement for beta 1, and it needs to be
implemented as soon as possible.

## Solution

Extend Agama to allow the specification of a license per product. The
license should be accepted on the product selection page. The solution
does not cover all cases (e.g., openSUSE licenses are not there yet) and
the technical details might change soon. But it is expected to be good
enough for beta 1.

The licenses are included in `/usr/share/agama/eula` with one directory
per license. The directory name is used as the license ID
(`license.beta` and `license.final`) and it contains the translations.

## Licenses

The licenses come from the
https://build.suse.de/package/show/SUSE:SLE-15-SP7:GA/skelcd package.

## Testing

- Added a new unit test
- Tested manually

## Screenshots

<details>
<summary>Click to show/hide some screenshots</summary>

---

**Be aware below screenshots were taken using mock data for emulating a
license in a product and illustrating the new interface controls and
behavior.**


| Product without license | Product with license |
|-|-|
|![Product without
license](https://github.com/user-attachments/assets/ee80b708-158d-4094-88df-afc2138c4744)
|![Product with
license](https://github.com/user-attachments/assets/2afb88c7-9494-425b-b471-fdd95e852b27)
|

| License accepted for a product not selected yet | License accepted for
a product previously selected |
|-|-|
| ![License accepted for a product not selected
yet](https://github.com/user-attachments/assets/320d83f0-b285-4068-b19b-d12f455d2c0a)
| ![License accepted for a product previously
selected](https://github.com/user-attachments/assets/3d530ea8-3ca8-49c8-99cc-0daa69481cd2)

|License dialog |
|-|
|![License
dialog](https://github.com/user-attachments/assets/2e0c27b3-bb1f-4479-a957-5bf7bf35b5b1)
|

</details>
## Problem


![agama-repo-failed](https://github.com/user-attachments/assets/522bb11c-9698-4278-816e-b472f25d73f1)


- When repository refresh fails there is no way how to retry the
operation
- The only workaround is to select a different product and then select
back the original product
- This obviously won't work if the installer contains only one product

## Solution

- Detect that a repository failed and offer a reload action

## Recording

<!--
[SLES4SAP-screen0.webm](https://github.com/user-attachments/assets/cd530256-c553-400a-b794-f628b06b3980)
-->

[SLES4SAP-screen0.webm](https://github.com/user-attachments/assets/ad9a5798-5f42-4333-8a4a-9419953a85ee)


- There is a new error section with "retry" link
- Unfortunately the VirtualBox does not record the mouse pointer so it
not obvious that the "Try again" link was clicked by mouse
- For easier testing I used a local copy of the SLE repository to easily
simulate unreachable repository and make it working for the retry
attempt. That's why you see a different (local) repository in the
recording.


## Details

- It turned out that it is not simple to detect a repository failure in
the software page.
- It reports an issue but it might contain a translated text or there
might be a different issue like missing product or pattern. That means
we cannot use the issues texts.
- We will very likely need a repository management later anyway it makes
sense to add API for fetching the current repository setup with the load
status (succeeded or failed).

## Tasks

- [x] DBus interface for listing the current repository setup (added the
`ListRepositories` DBus method)
- [x] Add the HTTP API endpoint `/api/software/repositories` using the
DBus backend above (@jreidinger thanks!)
- [x] Adapt the frontend code to show a failure
- [x] Adapt the frontend to retry after clicking a button

---------

Co-authored-by: Josef Reidinger <jreidinger@suse.cz>
@dgdavid dgdavid requested a review from joseivanlopez January 21, 2025 07:21
To adapt them to PF6 after mergin master into the feature branch.
By looking for a hidden element and adding a FIXME to see what is making
the component to be hidden for the a11y API.
@dgdavid dgdavid requested a review from ancorgs January 21, 2025 08:23
@dgdavid dgdavid merged commit c4b1e4b into storage-config-ui Jan 21, 2025
6 checks passed
@dgdavid dgdavid deleted the storage-config-ui-sync-master-20250121 branch January 21, 2025 12:48
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 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.

9 participants