Skip to content

Improve how we identify and run e2e smoke tests#2336

Open
dhuangnm wants to merge 4 commits intomainfrom
smoke
Open

Improve how we identify and run e2e smoke tests#2336
dhuangnm wants to merge 4 commits intomainfrom
smoke

Conversation

@dhuangnm
Copy link
Collaborator

@dhuangnm dhuangnm commented Feb 6, 2026

SUMMARY:
Currently we use the file tests/e2e/vLLM/rhaiis-e2e-smoke.list to mark the configs for smoke tests that we use to run for the RHAIIS image. This is vulnerable as we need to keep the list in this file up-to-date to any changes in the config yaml files and this is error-prone.

This PR removes this tests/e2e/vLLM/rhaiis-e2e-smoke.list file and use the config yaml file directly to mark the smoke tests. We added a new field test_group to the yaml file and updated the run_tests_in_*.sh scripts to parse this field and filter out tests if a test group (-g) is specified. This allows both python and rhaiis image testing be able to run smoke and full tests for the configs.

To be more specific:

$# to run e2e tests for all configs (default)
bash tests/e2e/vLLM/run_tests_in_python.sh -c tests/e2e/vLLM/configs -t tests/e2e/vLLM/test_vllm.py

$# to run e2e tests for configs with smoke only
bash tests/e2e/vLLM/run_tests_in_python.sh -c tests/e2e/vLLM/configs -t tests/e2e/vLLM/test_vllm.py -g rhaiis

Similar commands for the run_tests_in_rhaiis.sh script.

Going forward, for any newly added configs for the e2e tests, if we want to include them into the smoke tests for the RHAIIS image, we need to remember to add the test_group: "smoke" into their yaml file under the configs/ so we can automatically pick it up for the RHAIIS image testing.

TEST PLAN:
A successful run of the smoke tests is here:
https://github.com/neuralmagic/llm-compressor-testing/actions/runs/21727920814

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dhuangnm, 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 streamlines the management and execution of end-to-end smoke tests by integrating test group identification directly into the YAML configuration files. This eliminates a previously error-prone separate list file and introduces a flexible mechanism for test scripts to filter and run tests based on specified groups, improving the overall reliability and maintainability of the testing infrastructure for both Python and RHAIIS environments.

Highlights

  • Decentralized Smoke Test Identification: Smoke tests are now identified directly within their respective YAML configuration files via a new "test_group: "smoke"" field, eliminating the need for a separate rhaiis-e2e-smoke.list file.
  • Enhanced Test Script Flexibility: The run_tests_in_python.sh and run_tests_in_rhaiis.sh scripts have been updated to support a new -g (group) command-line argument, allowing users to execute either all tests or only those belonging to a specific group (e.g., "smoke").
  • Improved Maintainability: This change reduces the risk of configuration drift by ensuring that test group assignments are co-located with the test configurations themselves, simplifying the process of adding new smoke tests.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • tests/e2e/vLLM/configs/*.yaml
    • Introduced a "test_group: "smoke"" field to several existing test configuration YAML files to explicitly mark them as smoke tests.
  • tests/e2e/vLLM/rhaiis-e2e-smoke.list
    • Removed this file, as its functionality is now superseded by the test_group field in individual config files.
  • tests/e2e/vLLM/run_tests_in_python.sh
    • Modified to accept a new -g option for specifying a test group.
    • Updated to parse the test_group field from YAML configs and conditionally execute tests based on the provided group.
    • Added default paths for config and test files.
  • tests/e2e/vLLM/run_tests_in_rhaiis.sh
    • Updated to include the new -g option for test group filtering.
    • Modified to parse test_group from YAML configs and apply conditional test execution.
    • The script's usage message was updated.
    • Added default paths for config and test files.
Activity
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
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 improves the e2e smoke test identification by moving the configuration from a static file list to a test_group field within the YAML config files themselves. This is a great improvement for maintainability.

The implementation in the shell scripts, however, has some robustness issues. Specifically, there are problems with unquoted variables and fragile parsing methods (ls, grep/cut) which could cause the scripts to fail with filenames containing spaces or with slight variations in the YAML format. I've left specific comments with suggestions on how to make the scripts more robust.


echo "=== RUNNING MODEL: $MODEL_CONFIG ==="
# run test if test group is not specified or the config matching the specified test group
test_group=$(cat $MODEL_CONFIG | grep 'test_group:' | cut -d'"' -f2)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The variable $MODEL_CONFIG is not quoted, which will cause the script to fail if a config filename contains spaces. Also, the cat command is unnecessary.

While parsing YAML with grep and cut can be fragile, a simple fix is to quote the variable and remove the cat. For a more robust solution, consider using sed or awk to handle different quoting styles or spacing in the YAML file.

Suggested change
test_group=$(cat $MODEL_CONFIG | grep 'test_group:' | cut -d'"' -f2)
test_group=$(grep 'test_group:' "$MODEL_CONFIG" | cut -d'"' -f2)

echo "Test group is specified: $GROUP"
fi

CONFIGS=`ls "$CONFIG"`
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Using ls to populate a list of files is not recommended. It can lead to unexpected behavior with filenames that contain spaces or special characters. The subsequent loop that processes $CONFIGS is also likely to fail in such cases.

A safer and more robust way to iterate over files in a directory is to use a for loop with a glob pattern, like this:

for MODEL_CONFIG in "$CONFIG"/*
do
    # ... your logic here ...
done

This would require refactoring the existing loop structure but would make the script much more reliable.

save_dir=$(cat $MODEL_CONFIG | grep 'save_dir:' | cut -d' ' -f2)
model=$(cat $MODEL_CONFIG | grep 'model:' | cut -d'/' -f2)
scheme=$(cat $MODEL_CONFIG | grep 'scheme:' | cut -d' ' -f2)
test_group=$(cat $MODEL_CONFIG | grep 'test_group:' | cut -d'"' -f2)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Similar to the other script, the variable $MODEL_CONFIG is not quoted here, and cat is unnecessary. This can cause issues if filenames have spaces. The root cause is the use of ls earlier in the script, but this line is also problematic.

Also, parsing YAML with grep and cut is fragile. Please consider quoting the variable and using a more robust parsing method.

Suggested change
test_group=$(cat $MODEL_CONFIG | grep 'test_group:' | cut -d'"' -f2)
test_group=$(grep 'test_group:' "$MODEL_CONFIG" | cut -d'"' -f2)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want to call it "rhaiis" or something to indicate that this is also a test that runs for rhaiis e2e tests. Smoke is a bit misleading

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, updated the PRs accordingly to use "rhaiis".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments