Skip to content

Conversation

googs1025
Copy link
Collaborator

Pull Request Description

[Please provide a clear and concise description of your changes here]

Related Issues

Resolves: #[Insert issue number(s)]

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@googs1025 googs1025 force-pushed the kvcache_webhook branch 2 times, most recently from 50c303c to ed00058 Compare June 12, 2025 06:20
return backend
}

// TODO: Move validation logic to webhook.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Inspired by this todo

Copy link
Collaborator

Choose a reason for hiding this comment

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

please make sure --disable-webhook mode can be supported as well. there're some users want to use individual controllers. they want the minimum setup

default:
return false
}
return kv.Annotations[constants.KVCacheLabelKeyBackend]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when we have KVCache webhook, then we can just get from Annotations

@googs1025
Copy link
Collaborator Author

googs1025 commented Jun 12, 2025

TODO: add integration test

added

@googs1025 googs1025 force-pushed the kvcache_webhook branch 3 times, most recently from 61cb366 to a51508a Compare June 13, 2025 12:05
@Jeffwan
Copy link
Collaborator

Jeffwan commented Jun 18, 2025

part of #710

@googs1025
Copy link
Collaborator Author

will add some integration test this week

@googs1025 googs1025 force-pushed the kvcache_webhook branch 2 times, most recently from 9d165dd to 2332900 Compare June 21, 2025 03:15
Comment on lines +176 to +179
if backend == "" {
// In some case where webhooks are disabled (e.g., via --disable-webhook),
// mutating webhooks cannot inject default values into the spec. Using annotations
// ensures that users can still explicitly specify the backend, even when no webhook is active.
Copy link
Collaborator Author

@googs1025 googs1025 Jun 21, 2025

Choose a reason for hiding this comment

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

https://github.com/vllm-project/aibrix/pull/1187/files#r2155736323

We have made it compatible here and used comment to explain

cmpopts.IgnoreFields(orchestrationapi.KVCacheSpec{}, "Service"),
cmpopts.IgnoreFields(metav1.ObjectMeta{}, "UID", "ResourceVersion", "Generation", "CreationTimestamp", "ManagedFields")))
},
ginkgo.Entry("apply kvcache with no backend specified", &testDefaultingCase{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add mutating webhook test case

}),
)

type testValidatingCase struct {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add valid webhook case

@googs1025 googs1025 changed the title WIP: [Misc] feature: use kvcache webhook [Misc] feature: use kvcache webhook Jun 21, 2025
@googs1025 googs1025 force-pushed the kvcache_webhook branch 2 times, most recently from 71b2848 to d97cb90 Compare June 21, 2025 04:04
@googs1025 googs1025 requested a review from Jeffwan June 25, 2025 08:49
@googs1025
Copy link
Collaborator Author

@Jeffwan
I added some test to cover this feature 😄
PTAL when you have some time thanks

@Jeffwan
Copy link
Collaborator

Jeffwan commented Jun 30, 2025

@googs1025 overall looks good to me. Could you rebase the code and resolve the conflict?

@googs1025
Copy link
Collaborator Author

@googs1025 overall looks good to me. Could you rebase the code and resolve the conflict?

done

googs1025 added 3 commits July 3, 2025 16:48
Signed-off-by: googs1025 <googs1025@gmail.com>
Signed-off-by: googs1025 <googs1025@gmail.com>
Signed-off-by: googs1025 <googs1025@gmail.com>
@Jeffwan Jeffwan force-pushed the kvcache_webhook branch from 7f95457 to 863576d Compare July 3, 2025 08:48
@Jeffwan Jeffwan merged commit 2d8de1d into vllm-project:main Jul 3, 2025
11 checks passed
Yaegaki1Erika pushed a commit to Yaegaki1Erika/aibrix that referenced this pull request Jul 23, 2025
* feature: use kvcache webhook

Signed-off-by: googs1025 <googs1025@gmail.com>

* fix integation validating test error

Signed-off-by: googs1025 <googs1025@gmail.com>

* add mutating webhook integration test for kvcache

Signed-off-by: googs1025 <googs1025@gmail.com>

---------

Signed-off-by: googs1025 <googs1025@gmail.com>
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