-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Update --labels and add --labels-file options for Label Selector API
#51706
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
Update --labels and add --labels-file options for Label Selector API
#51706
Conversation
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
MengjinYan
left a comment
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.
Thanks!
Signed-off-by: Ryan O'Leary <[email protected]>
MengjinYan
left a comment
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.
Thanks!
Signed-off-by: Ryan O'Leary <[email protected]>
edoakes
left a comment
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.
Looks good, minor comments
One larger comment: let's rename the argument to --labels-file (it more closely matches some other CLI options we have elsewhere, such as --config-file for serve)
--labels and add --labels-from-file options for Label Selector API--labels and add --labels-file options for Label Selector API
Signed-off-by: Ryan O'Leary <[email protected]>
Co-authored-by: Edward Oakes <[email protected]> Signed-off-by: ryanaoleary <[email protected]>
edoakes
left a comment
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.
🚀
edoakes
left a comment
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.
I believe you will need to add entries to the tests BUILD file for these tests to run (unless something changed recently to automatically pick them up)
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
|
ping when CI passes (want to spot check and make sure tests ran as expected) |
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
@edoakes the PR is now passing the CI, I checked and it looks like the new test file is being ran: |
…elector API (ray-project#51706)" This reverts commit 0a5f970.

Why are these changes needed?
This PR updates the
--labelsoption toray startorray initto accept a string list of key-value pairs mapping label names to label values. Labels follow Kubernetes label syntax. This PR also adds a--labels-fileargument to support sourcing labels from a file. Files are expected to contain a valid JSON string containing a serialized key-value pair map. We useparse_node_labels_jsonto parse the argument passed to--labels-file.Related issue number
#51564
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.