From 5aa5db571d0f528c466de71cff0199e1da5572a4 Mon Sep 17 00:00:00 2001 From: Yaminyam <31057849+Yaminyam@users.noreply.github.com> Date: Fri, 3 May 2024 13:28:47 +0000 Subject: [PATCH] fix: Modify help text for delete and purge domain (#1894) Domain's purge help text explains delete. Of course, delete and purge are words used with similar meanings, but there is a command called domain delete, which can confuse users. ``` Delete the given virtual folder. Purge the given virtual folder. ``` I modified it by referring to the vfolder delete and purge help phrases above. **Checklist:** (if applicable) - [x] Milestone metadata specifying the target backport version - [ ] Mention to the original issue - [ ] Installer updates including: - Fixtures for db schema changes - New mandatory config options - [ ] Update of end-to-end CLI integration tests in `ai.backend.test` - [ ] API server-client counterparts (e.g., manager API -> client SDK) - [ ] Test case(s) to: - Demonstrate the difference of before/after - Demonstrate the flow of abstract/conceptual models with a concrete implementation - [ ] Documentation - Contents in the `docs` directory - docstrings in public interfaces and type annotations --- src/ai/backend/client/cli/admin/domain.py | 4 ++-- src/ai/backend/client/func/domain.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ai/backend/client/cli/admin/domain.py b/src/ai/backend/client/cli/admin/domain.py index 503072443d2..211faaec57b 100644 --- a/src/ai/backend/client/cli/admin/domain.py +++ b/src/ai/backend/client/cli/admin/domain.py @@ -228,7 +228,7 @@ def update( @click.argument("name", type=str, metavar="NAME") def delete(ctx: CLIContext, name: str) -> None: """ - Inactive an existing domain. + Deletes an existing domain. This action only deletes the primary record and might leave behind some associated data or metadata that can be manually cleaned up or ignored. Ideal for removing items that may be re-created or restored. NAME: Name of a domain to inactive. """ @@ -262,7 +262,7 @@ def delete(ctx: CLIContext, name: str) -> None: @click.argument("name", type=str, metavar="NAME") def purge(ctx: CLIContext, name: str) -> None: """ - Delete an existing domain. + Purges an existing domain. This action is irreversible and should be used when you need to ensure that no trace of the resource remains. NAME: Name of a domain to delete. """ diff --git a/src/ai/backend/client/func/domain.py b/src/ai/backend/client/func/domain.py index 80492ad58ca..1891ec1d28b 100644 --- a/src/ai/backend/client/func/domain.py +++ b/src/ai/backend/client/func/domain.py @@ -183,7 +183,7 @@ async def update( @classmethod async def delete(cls, name: str): """ - Inactivates an existing domain. + Deletes an existing domain. This action only deletes the primary record and might leave behind some associated data or metadata that can be manually cleaned up or ignored. Ideal for removing items that may be re-created or restored. """ query = textwrap.dedent( """\ @@ -202,7 +202,7 @@ async def delete(cls, name: str): @classmethod async def purge(cls, name: str): """ - Deletes an existing domain. + Purges an existing domain. This action is irreversible and should be used when you need to ensure that no trace of the resource remains. """ query = textwrap.dedent( """\