Skip to content
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

Cli: make namespace optional to adapt to ListAll operation #361

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

Jeffwan
Copy link
Collaborator

@Jeffwan Jeffwan commented Jul 8, 2022

Why are these changes needed?

CLi doesn't make corresponding changes when we add ListAll

// Finds all Clusters in all namespaces. Supports pagination, and sorting on certain fields.
rpc ListAllClusters(ListAllClustersRequest) returns (ListAllClustersResponse) {
option (google.api.http) = {
get: "/apis/v1alpha2/clusters"
};
}

We want to make namespace field optional so

  1. without namespace -> it will fetch all clusters across multiple namespaces
  2. with namespace -> fetch cluster under given namespace
./main template compute list
+------------------------+------------+-----+--------+-----+-----------------+
|          NAME          | NAMESPACE  | CPU | MEMORY | GPU | GPU-ACCELERATOR |
+------------------------+------------+-----+--------+-----+-----------------+
| compute-template-test2 | default    |   1 |      1 |   0 |                 |
| compute-mid            | ray-system |   2 |      2 |   0 |                 |
| compute-template-test  | ray-system |   1 |      1 |   0 |                 |
| test                   | ray-system |   1 |      1 |   0 |                 |
| test-hehe              | ray-system |   1 |      1 |   0 |                 |
+------------------------+------------+-----+--------+-----+-----------------+

./main template compute list --namespace=default
+------------------------+-----------+-----+--------+-----+-----------------+
|          NAME          | NAMESPACE | CPU | MEMORY | GPU | GPU-ACCELERATOR |
+------------------------+-----------+-----+--------+-----+-----------------+
| compute-template-test2 | default   |   1 |      1 |   0 |                 |
+------------------------+-----------+-----+--------+-----+-----------------+

Related issue number

Address #348

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Copy link
Collaborator

@scarlet25151 scarlet25151 left a comment

Choose a reason for hiding this comment

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

Overall LGTM.

@Jeffwan Jeffwan merged commit 2f04017 into ray-project:master Jul 8, 2022
@Jeffwan Jeffwan deleted the improve_cli_namespace branch July 8, 2022 17:53
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
@kevin85421 kevin85421 mentioned this pull request Oct 25, 2023
4 tasks
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.

None yet

2 participants