* unify remove and delete command groups & the add and delete command groups
* added changelog
* fix tests
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
* Do not modify PACKAGE_NAME on install
* Fix ci pkg action
* Required
* Typos
* Apply suggestions from code review
* Undo defaults
* Cleanup
* Implement idea
* Fuck
* Apps mock fix
* Fix app-pytest with PKG_NAME=app
* Justus suggestion
* Debug Windows
* Update setup.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Revert "Debug Windows"
This reverts commit 9fe3ba3665.
* SSH action
* Crazy bug
* Revert "SSH action"
This reverts commit 5061e8e7d6.
* Package import step
* Avoid env conflict
* Debug
* Whitespace
* Try removing existing lite build
* This should be redundant now
* Add back env now that source-lit is gone
* Remove download artifact
* checkgroup
* TODOs suggested by Jirka
* _
* Revert "_". These are local variables, do not need protected
This reverts commit 8340b85991.
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* implement ssh command
* add tests that ssh command is available
* most SSH command tests
* update changelog
* Update src/lightning_app/cli/lightning_cli.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* adrian feedback pt1
* Update src/lightning_app/cli/lightning_cli.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* more feedback
* rework to support app name
* update tests based on different interface
* Update src/lightning_app/cli/lightning_cli.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update src/lightning_app/cli/lightning_cli.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update src/lightning_app/cli/lightning_cli.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update src/lightning_app/cli/lightning_cli.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* update tests with changed expectation
* fix tests that broke with introduction of shutils
* fix too long line
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
## What does this PR do?
Removes the ability to specify `--instance-types` when creating clusters.
Instead, all clusters will be able to use every instance type supported by the platform.
* add cli commands for adding/ removing resources
as discussed with Adrian, we want to adopt "lightning add" and "lightning remove" for ssh-keys,
as the resource already exists.
* implement ssh-key management
* one parameter for public key, optional name
* handle the case where a private key file was provided
* make ssh key-mgmt support classes protected
* re-order add ssh-key args
* change types signatures of add_key
* rename test cases
* update changelog
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
## What does this PR do?
The lightning CLI uses the lightning APIs to create, read, update, and delete resources such as apps and clusters.
If an API call fails due to client error (e.g. invalid input, unauthorized, unauthenticated) the API will return an HTTP status code in the 400s, along with a custom message in the response body.
The CLI (usually) does not directly handle these exceptions. As a result the exception bubbles up through the click framework (which does not recognize the exception type) and to the python runtime, which produces a long traceback and dumps the raw exception to the user.
This PR fixes the user experience. When our API fails on a client error, the CLI will display the message from the server without a traceback.
* pinning starsessions
* pinning starsessions
* adding strict back to requirements.txt
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Duplicated
* Basic implementation
* Basic implementation
* Basic implementation
* Basic implementation
* Common things moved to log helpers file
* Decomposing logs reader classes for reusing
* Setting colors for log levels
* Manifest trimming
* Changes added to CHANGELOG
* Prettifications
* Prettifications
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Logs function name change
* Logs function name change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* attempt to fix the pydanitc import
* Tests + command name fixes
* Extending tests
* Adding limit argument
* Unmerging CI fix
* Unmerging CI fix
* Adding fields for errors
* Adding log level fixed field width
* Adding absent typing + exeptions raising
* Adding socket error logging
* Addressing comments on cluster list function return value
* Addressing comments on adding e2e tests
* Adding version range for arrow package in reqs
* New unit tests
* arrow time parsing callback modified + unit tests
* helpers updated
* helpers updated
* helpers updated
* One more test
* CMD test fix
* CMD test fix
* CMD test fix
* CMD test fix
* CMD test fix
* LightningClient mocking
* Flaky test removed
Co-authored-by: hhsecond <sherin@grid.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
fix cluster creation CLI requiring instace-type selection
we've marked `instance_types` as `required=False`, but the CLI calls `split` on the value.
So if nothing is provided, we'll actually receive a runtime error, effectively rendering the flag as required.
Co-authored-by: thomas chaton <thomas@grid.ai>
* add support for listing apps
* update changelog with correct PR number
* add tests for pagination
* fix wrong mock on test_cli
* ensure all enum values are accounted for
* make AppManager and AppList protected, add limit to pagination calls
* add restarting transition /w tests
* add state transition not yet run with tests
* tests
* ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: mansy <mansy@lightning.ai>