Skip to content

Conversation

@DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Sep 24, 2025

Purpose

KV sharing tests have been failing since #22628 but have not been caught because the test isn't actually being run. This PR fixes the tests and also adds them to the CI.

I found that test_request.py is also not being run so I have added it to the CI as well.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 24, 2025
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 addresses an issue where some V1 tests were not being executed in the CI pipeline. The changes in .buildkite/test-pipeline.yaml correctly add test_kv_sharing.py and test_request.py to the test runs. The modifications in tests/v1/test_kv_sharing.py are intended to adapt the tests to a recent API change. However, I've identified a critical flaw in the updated test logic. The tests now include tautological assertions that don't validate the production code's behavior, which could provide a false sense of correctness. My review comments detail these issues and suggest how to resolve them.

Signed-off-by: DarkLight1337 <[email protected]>
Copy link
Collaborator

@sarckk sarckk left a comment

Choose a reason for hiding this comment

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

thanks for the catch!

note: since #22628 moved the actual KV sharing up logic to the gpu model runner, unit tests in

pytest tests/v1/worker/test_gpu_model_runner.py -k "test_init_kv_cache"

will cover the KV sharing logic including assertions that were removed in this PR.

Copy link
Collaborator

@NickLucche NickLucche left a comment

Choose a reason for hiding this comment

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

LGTM, left a comment about grouping these tests though

Comment on lines 300 to +306
- pytest -v -s v1/spec_decode
- pytest -v -s v1/kv_connector/unit
- pytest -v -s v1/metrics
- pytest -v -s v1/test_kv_sharing.py
- pytest -v -s v1/test_metrics_reader.py
- pytest -v -s v1/test_oracle.py
- pytest -v -s v1/test_request.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder whether we should factor these tests into their own folder so we can just do pytest -v v1/core ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's address that in another PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to change this V1 Test others from running a list of files to running all files that are not covered by other tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Technically I think it's possible - I can think of two ways to go about it:

  1. Scan the test-pipeline.yaml file and parse the commands corresponding to the rest of the V1 test CIs to figure out which tests are not being covered.
  2. Add a pytest mark for the tests that are covered by the rest of the V1 test CIs , then we can exclude tests with those marks in the "other" CI

Copy link
Member Author

Choose a reason for hiding this comment

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

But either way, it would be quite complicated

@DarkLight1337 DarkLight1337 merged commit db1e42f into vllm-project:main Sep 26, 2025
78 checks passed
@DarkLight1337 DarkLight1337 deleted the missing-v1-tests branch September 26, 2025 12:52
pdasigi pushed a commit to pdasigi/vllm that referenced this pull request Oct 2, 2025
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: yewentao256 <[email protected]>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants