Skip to content

[1/N] CI refactor: introduce CI register.#13345

Merged
hnyls2002 merged 15 commits intomainfrom
lsyin/ci-folder-organize
Nov 17, 2025
Merged

[1/N] CI refactor: introduce CI register.#13345
hnyls2002 merged 15 commits intomainfrom
lsyin/ci-folder-organize

Conversation

@hnyls2002
Copy link
Copy Markdown
Collaborator

@hnyls2002 hnyls2002 commented Nov 15, 2025

This PR:

  • Introduce CI register
  • Deprecate the lang tests.
  • Move test_srt_backend.py into the new CI folder per_commit

@hnyls2002 hnyls2002 marked this pull request as draft November 15, 2025 19:01
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @hnyls2002, 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 initiates a refactoring of the CI system by introducing a new mechanism for registering and categorizing unit tests. It provides a Python module that uses Abstract Syntax Tree (AST) parsing to identify test classes and extract their associated CI configuration, such as required hardware backend, estimated execution time, and CI stage, through dedicated decorators. This change lays the groundwork for a more structured and automated CI pipeline, enabling dynamic test selection and execution based on defined metadata.

Highlights

  • New CI Test Visitor Module: Introduces ut_visitor.py, a new Python module designed to parse test files and extract Continuous Integration (CI) related metadata using Abstract Syntax Tree (AST) traversal.
  • Hardware Backend Enumeration: Defines a HWBackend enumeration (SKIP, CUDA, AMD) to categorize tests based on their required hardware execution environment.
  • Decorator-based CI Registration: Implements placeholder decorators (skip_ci, register_cuda_ci, register_amd_ci) that will be used to mark test classes with specific CI configurations, including hardware requirements, estimated execution time, and CI stage.
  • AST Parsing for CI Metadata: Utilizes Python's ast module within TestCaseVisitor to programmatically identify CustomTestCase classes and parse the arguments of their associated CI decorators, enabling automated collection of test metadata.
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.

Copy link
Copy Markdown
Contributor

@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 a new utility script for parsing CI test decorators from test files. The approach of using an AST visitor is solid. I've provided feedback on a few areas to improve robustness and correctness: fixing a typo, using dataclasses for data-holding classes to fix a bug and improve clarity, and refactoring the AST visiting and argument parsing logic to be more robust and readable.

@hnyls2002 hnyls2002 changed the title [1/N] CI refactor: introduce ut decorator [1/N] CI refactor: introduce CI register. Nov 16, 2025
@hnyls2002 hnyls2002 marked this pull request as ready for review November 16, 2025 16:12
@github-actions github-actions bot added the amd label Nov 16, 2025
@hnyls2002 hnyls2002 force-pushed the lsyin/ci-folder-organize branch from 0a18177 to 7255579 Compare November 16, 2025 16:19
@hnyls2002 hnyls2002 merged commit ab63f3c into main Nov 17, 2025
12 of 48 checks passed
@hnyls2002 hnyls2002 deleted the lsyin/ci-folder-organize branch November 17, 2025 04:21
@hnyls2002 hnyls2002 mentioned this pull request Nov 24, 2025
7 tasks
alisonshao added a commit that referenced this pull request Dec 16, 2025
1. Add python/sglang/test/ci/__init__.py to fix ModuleNotFoundError
   when importing from sglang.test.ci module (missing since PR #13345)

2. Add stage-b-test-2-gpu workflow job to run the stage-b-test-small-2-gpu
   suite which is used by test_lora_tp.py
alisonshao added a commit that referenced this pull request Dec 17, 2025
1. Add python/sglang/test/ci/__init__.py to fix ModuleNotFoundError
   when importing from sglang.test.ci module (missing since PR #13345)

2. Add stage-b-test-2-gpu workflow job to run the stage-b-test-small-2-gpu
   suite which is used by test_lora_tp.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants