During the partial re-implementation of yast2-users, we found a couple of things to be improved in Y2Issues.
1) The Y2Issues severity levels were :warn and :fatal. But other parts of YaST use slightly different conventions for similar concepts[1]:
In the module Report there are functions line, Message, Warning and Error.
In the <report> section of the AutoYaST profile, it's possible to define the behavior for the following categories: errors, warnings, messages, yesno_messages.
2) The current implementation of Y2Issues::Reporter was too focused in a single use case - showing errors found while processing the AutoYaST profile and offering the user the opportunity to abort installation.
Solution
Renamed :fatal to :error.
Changed behavior of Y2Issue::Reporter to be more generic, just displaying the errors
Introduced Y2Issue::AutoinstReporter to retain the old behavior
Pending
Adapt yast2-network to the new API
Adapt yast2-users (the new y2users branch) to the new API
Manual testing
Notes
[1] The installation proposals follow a different convention, but I don't think it's expected to use Y2Issues in that context. Just for completeness, let's list here the warning levels accepted for a proposal:
:notice
:warning (default)
:error
:blocker
:fatal
A :blocker will prevent the user from continuing the installation. If any proposal contains a blocker warning, the Accept button in the proposal dialog will be disabled - the user needs to fix that blocker before continuing.
:fatal is like :blocker but also stops building the proposal.
An :error does not prevent continuing of the installation, but shows a popup that an user has to confirm to continue with the installation.
Coverage increased (+0.05%) to 40.981% when pulling b264c5d9ec36342eb14802ef6c112b0c64a8474e on ancorgs:issues_error into 3197fb8bf5686b256f351def1ce8b77abcd98ffe on yast:master.
Problem
During the partial re-implementation of yast2-users, we found a couple of things to be improved in Y2Issues.
1) The Y2Issues severity levels were
:warn
and:fatal
. But other parts of YaST use slightly different conventions for similar concepts[1]:Report
there are functions line,Message
,Warning
andError
.<report>
section of the AutoYaST profile, it's possible to define the behavior for the following categories: errors, warnings, messages, yesno_messages.2) The current implementation of
Y2Issues::Reporter
was too focused in a single use case - showing errors found while processing the AutoYaST profile and offering the user the opportunity to abort installation.Solution
:fatal
to:error
.Y2Issue::Reporter
to be more generic, just displaying the errorsY2Issue::AutoinstReporter
to retain the old behaviorPending
Notes
[1] The installation proposals follow a different convention, but I don't think it's expected to use Y2Issues in that context. Just for completeness, let's list here the warning levels accepted for a proposal:
:notice
:warning
(default):error
:blocker
:fatal
A
:blocker
will prevent the user from continuing the installation. If any proposal contains a blocker warning, the Accept button in the proposal dialog will be disabled - the user needs to fix that blocker before continuing.:fatal
is like:blocker
but also stops building the proposal.An
:error
does not prevent continuing of the installation, but shows a popup that an user has to confirm to continue with the installation.