feat: add kylin v10-sp1/sp2#2863
Conversation
Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add kylin v10-sp1/sp2 Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zuoxuesong-worker The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary of ChangesHello @zuoxuesong-worker, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates support for Kylin v10-sp1/sp2 by updating the ISO download paths to a more dynamic 'iso-latest' tag and improving the parsing and formatting of operating system identification strings. These changes ensure better compatibility and maintainability for different Linux distributions, particularly Kylin, within the repository configuration. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for Kylin v10 SP1/SP2 and refactors the ISO download URLs. The change to use iso-latest in builtin/core/roles/defaults/vars/10-download.yaml is a good maintainability improvement. The modifications in builtin/core/roles/native/repository/tasks/main.yaml are intended to correctly generate system strings for the new Kylin versions. However, I have identified a high-severity issue regarding inconsistent filtering that could affect non-Kylin operating systems. My detailed feedback is in the review comment below.
| {{- else if .os.release.ID_LIKE | unquote | eq "rhel fedora" }} | ||
| {{ .os.release.ID }}{{ .os.release.VERSION_ID }} | ||
| {{ .os.release.ID | replace "\"" "" | unquote | trim | lower }}{{ .os.release.VERSION_ID | trim }} | ||
| {{- else }} | ||
| {{ .os.release.ID }}-{{ .os.release.VERSION_ID }} | ||
| {{ .os.release.ID | replace "\"" "" | unquote | trim | lower }}-{{ .os.release.VERSION_ID | trim }} | ||
| {{- end -}} |
There was a problem hiding this comment.
The filtering applied to .os.release.VERSION_ID is inconsistent across different operating systems. For Kylin (line 24), it is fully sanitized with replace "\"" "" | unquote | trim | lower. However, for rhel fedora based systems (line 26) and others (line 28), it only has trim.
This can lead to incorrect system_string values if .os.release.VERSION_ID contains quotes or has varied casing for non-Kylin OSes. For example, if VERSION_ID is "8", the system_string would become centos"8", which is likely not the intended behavior. This issue is particularly important because the sanitization filters on .system_string were removed later in this file (line 44).
To ensure robustness and consistency, please apply the same sanitization filters to .os.release.VERSION_ID for all distributions.
{{- else if .os.release.ID_LIKE | unquote | eq "rhel fedora" }}
{{ .os.release.ID | replace "\"" "" | unquote | trim | lower }}{{ .os.release.VERSION_ID | replace "\"" "" | unquote | trim | lower }}
{{- else }}
{{ .os.release.ID | replace "\"" "" | unquote | trim | lower }}-{{ .os.release.VERSION_ID | replace "\"" "" | unquote | trim | lower }}
{{- end -}}|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: d39f9d4b09310ddf8815b56d9a66c6375a44e0dd |



feat: add kylin v10-sp1/sp2
What type of PR is this?
/kind feature
What this PR does / why we need it:
add feature for kylin v10-sp1/sp2
Which issue(s) this PR fixes:
Fixes #
#2859
Special notes for reviewers:
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.: