Skip to content

Cli submit delete raycluster #257

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

Merged
merged 15 commits into from
Aug 2, 2023
Merged

Cli submit delete raycluster #257

merged 15 commits into from
Aug 2, 2023

Conversation

carsonmh
Copy link
Contributor

@carsonmh carsonmh commented Jul 31, 2023

Issue link

Closes #239

What changes have been made

  • Adds submit raycluster and delete raycluster to the CLI so the user can submit and delete to and from their Kubernetes cluster from the terminal. Unit tests included.
  • Changed CLI functionality slightly so authentication and cli-generated .codeflare folder are loaded and saved for each command to access.
  • Added Cluster.from_definition_yaml command to get a Cluster object from a defined yaml file.

Verification steps

After building SDK, you can run codeflare to see a list of all commands.

  • To test submit command, make sure you define a raycluster using codeflare define raycluster and then you can submit it using codeflare submit raycluster specifying name
  • To test delete command, run codeflare delete raycluster specifying name and namespace.

You can also run the unit tests with python -m pytest tests/unit_test.py or pytest -v tests/unit_test.py.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Copy link
Contributor

@Fiona-Waters Fiona-Waters left a comment

Choose a reason for hiding this comment

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

Looks great. Just a few unused imports to be removed.
Was able to verify that submit and delete functions work as expected and that new unit tests pass.

@Fiona-Waters
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 2, 2023
@Fiona-Waters Fiona-Waters merged commit 15e6f26 into project-codeflare:cli-update Aug 2, 2023
carsonmh added a commit that referenced this pull request Aug 11, 2023
* add: create cluster from yaml function

* add: submit and delete functions

* change: cluster_name to name in submit raycluster

* add: load_auth in delete function

* update: make get_cluster function use new config

* test: unit tests for submit and delete raycluster commands

* change: format slightly on submit/delete commands

* Add: context for current namespace and .codeflare path

* fix: remove load_auth in functions so it doesn't run twice

* Add: help messages for submit and delete functions

* cleanup

* remove: remove get_namespace every function call

* fix: fix tests

* change: make namespace default to 'default'
and change test slightly

* refactor: remove unused imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants