-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: report unsupported AutoYaST elements #1976
base: master
Are you sure you want to change the base?
Conversation
08506d9
to
277eb9d
Compare
* Improve the structure of the data, adding proper support for nested elements.
0c0b499
to
b621c12
Compare
80a1704
to
4e515bd
Compare
4e515bd
to
2b110d6
Compare
Pull Request Test Coverage Report for Build 13202155965Details
💛 - Coveralls |
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.
Comments based so far on the description only, not on code.
-
Agama checks the profile for unsupported elements.
When does this happen? Only when I try to use the profile, or can I trigger it beforehand, on a dry run?
-
"Not supported AY elements" popup
I think it would be nice to also include this text.
This popup can be disabled by passing agama.ay_check=0 on the kernel command line
Also IIUC the popup displays the "planned" and "no" categories. What about "partial"? |
@@ -53,5 +54,9 @@ export default function Questions(): React.ReactNode { | |||
QuestionComponent = LuksActivationQuestion; | |||
} | |||
|
|||
if (currentQuestion.class === "autoyast.unsupported") { |
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.
Please add a table item to doc/questions.md
module AutoYaST | ||
# This class checks an AutoYaST profile and determines which unsupported elements are used. | ||
# | ||
# It does not report unknown elements. |
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.
So what happens with unknown elements? Are they silently ignored now or does a different part of Agama report them?
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 decided to ignore them by now and report only the status of the known elements. The idea is to extend the compat
file to cover all the AutoYaST elements, stating whether it is unsupported, supported or planned.
Co-authored-by: Martin Vidner <mvidner@suse.cz>
The "partially supported" elements are meant for container elements. When you check the profile, they are not relevant: the important part is the element within. For instance, if you have the following code: <networking>
<backend>wicked</backend>
</networking> Agama will report that However, the "partial" category can be used when generating the AutoYaST compatibility documentation. |
Well, it happens automatically when using an AutoYaST profile (
IMHO,
Good point. |
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.
Interface Code LGTM
+1 |
and remove 'support: yes' from users[], it is implicit on all items with 'children'
zypper install python3-jsonschema.rpm jsonschema -i autoyast-compat.json autoyast-compat.schema.json TODO: check in CI, maybe make `agama profile validate` a bit more generic
@@ -68,6 +68,7 @@ | |||
{ "key": "description", "support": "no" }, | |||
{ | |||
"key": "bootproto", | |||
"support": "no", |
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.
@imobachgs Creating the schema did help finding the missing support
here. Yay! Is no
right?
This comment was marked as resolved.
This comment was marked as resolved.
In today's review you mentioned the problem of keeping the JSON in sync with the code. |
Problem
Agama does not offer information about which elements are supported when importing an AutoYaST profile and which ones are just ignored.
https://trello.com/c/0u2wwMN2
Solution
Agama checks the profile for unsupported elements. If it finds them, it displays a question listing them and asking the user whether to continue.
Generating the documentation
The mechanism to detect unsupported elements includes a list of all AutoYaST elements and whether they are supported: "yes", "planned", "partial" or "no". The file also contains hints about replacing some elements (e.g., using a post-script).
Although it was out of scope, this PR introduces a new
doc:autoyast_compat
which generates a reference to be included in the AutoYaST support documentation. Not all elements are included, but we can create a follow-up PBI to work on that.Disabling the check
It is possible to disable the check specifying
agama.ay_check=0
on kernel's command line. Actually, the check is done, but it does not report found problems.Testing
Screenshots
Below is an example of the AutoYaST compatibility documentation automatically generated by the new
doc:autoyast_compat
task.To do
autoyast-compat.json
file.