-
Notifications
You must be signed in to change notification settings - Fork 4.2k
CAS: move DRA consts go into core #8595
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
Closed
jackfrancis
wants to merge
1
commit into
kubernetes:master
from
jackfrancis:move-dra-gke-labels-to-core
+13
−11
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, sorry for missing this part during review. IMO this test code shouldn't depend on anything GCE/GKE-specific. And it in fact doesn't, this test case doesn't really test anything at the moment. The Node is treated as ready because it doesn't have the GPU label that
TestCloudProvider.GPULabel()
returns, not because it has the DRA enablement label.I think something like this would be much better (and would actually test the DRA part of the logic):
TestCloudProvider
to allow configuring the result ofTestCloudProvider.GetNodeGpuConfig()
from the test code.TestCloudProvider.GetNodeGpuConfig()
differently in different test cases.TestCloudProvider.GPULabel()
label, and the behavior is different based on the result ofTestCloudProvider.GetNodeGpuConfig()
(the Node is ready ifDraDriverName
is set, the Node is not ready ifExtendedResourceName
is set).WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's a quick & dirty draft of what #1 might look like (and also a sanity check that I'm following your logic):
#8604
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the
DraGPULabelGKE
is not required for the test, then i'm in favor of using a more neutral label like something from the test provider. as long as we don't introduce the circular dependency ;)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackfrancis Yup, this is exactly what I meant in step 1 - LGTMd the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#8607