-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Webhook Unit Test Suite #578
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cluster name instead)
richardsliu
reviewed
Apr 18, 2024
richardsliu
reviewed
Apr 18, 2024
richardsliu
approved these changes
Apr 19, 2024
/gcbrun |
alpha-amundson
pushed a commit
that referenced
this pull request
May 3, 2024
* Test suite initial commit * Remove unused annotations from certs/ * remove duplicate sample * Added more unit tests * Change logging level and fix tpu v5e chips per host calculation * Add remaining unit tests * Calculate TPU chips per VM host using google.com/tpu Resource value * Remove headlessServiceName var (dynamically generate it with current cluster name instead) * Resolve merge issues * Fix headlessServiceName and finish tests * Change RayCluster name back to default value * Final test changes * Fix bug for determining replicaIndex with workergroup name with dashes * Add troubleshooting guide * Add test for nil workerGroupSpecs in validateRayCluster * Update troubleshooting guide * Add example Pod env
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive unit test suite for the Ray TPU webhook. These unit tests can be run with the command
go test
from theapplications/ray/kuberay-tpu-webhook
folder. These tests cover 75.3% of statements in the webhook including all major pieces of logic.This PR also updates some of the logic in the webhook code to resolve corner cases found during testing. This includes adding a
getNumTPUChipsRequested
function which returns thegoogle.com/tpu
request value of a container, using that value to calculate the # TPU VM hosts for a given TPU worker group (rather than usingacceleratorType
to guess themachineType
). This PR also removes theheadlessServiceName
var and instead dynamically generates the headless service name for any given cluster.A follow-up PR will add end-to-end tests for the webhook.
This PR has been tested with: