Skip to content

feat: add kylin v10-sp1/sp2#2863

Merged
kubesphere-prow[bot] merged 1 commit intokubesphere:mainfrom
zxs-test:feat/feat-for-kylin-sp1-sp2
Nov 20, 2025
Merged

feat: add kylin v10-sp1/sp2#2863
kubesphere-prow[bot] merged 1 commit intokubesphere:mainfrom
zxs-test:feat/feat-for-kylin-sp1-sp2

Conversation

@zuoxuesong-worker
Copy link
Copy Markdown
Contributor

@zuoxuesong-worker zuoxuesong-worker commented Nov 20, 2025

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:

add feature for kylin v10-sp1/sp2

Does this PR introduced a user-facing change?

add feature for kylin v10-sp1/sp2

Additional documentation, usage docs, etc.:


Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>

feat: add kylin v10-sp1/sp2

Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
@kubesphere-prow kubesphere-prow bot added release-note kind/feature Categorizes issue or PR as related to a new feature. labels Nov 20, 2025
@kubesphere-prow
Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubesphere-prow kubesphere-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2025
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @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

  • Kylin v10-sp1/sp2 Support: Added specific support for Kylin v10-sp1 and v10-sp2 operating systems, expanding compatibility.
  • ISO Download URL Update: Modified ISO download URLs to point to a 'iso-latest' tag instead of a date-specific one, ensuring access to the most recent ISOs for various distributions.
  • Improved System String Parsing: Enhanced the logic for generating system-specific strings by adding robust string cleaning (unquoting, trimming, lowercasing) for OS ID and version, leading to more consistent naming.
  • Simplified ISO Name Generation: Streamlined the process of constructing ISO filenames by removing redundant string manipulation, relying on the pre-formatted system string for efficiency.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kubesphere-prow kubesphere-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 20, 2025
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 25 to 29
{{- 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 -}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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 -}}

@redscholar
Copy link
Copy Markdown
Contributor

/lgtm

@kubesphere-prow kubesphere-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2025
@kubesphere-prow
Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: d39f9d4b09310ddf8815b56d9a66c6375a44e0dd

@kubesphere-prow kubesphere-prow bot merged commit 21ccfe2 into kubesphere:main Nov 20, 2025
4 checks passed
@zuoxuesong-worker zuoxuesong-worker deleted the feat/feat-for-kylin-sp1-sp2 branch December 30, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants