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

chore: add config policies to CLI reference docs #10118

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/manage/config-policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ or CLI.
both the invariant config and constraints for a given scope are updated together. It is not
possible to update only one of these components independently.

.. note::

It is recommended that administrators save their configuration policies for each scope in
separate YAML or JSON files. This provides an easy way to back up and restore policies if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Order is good.

I don't agree with the reasons for the suggestion though. The config policies will be consistent if set via webUI or CLI whether admins draft them separately or not. That makes it sound like there's a bug in our APIs or something.

I think the reason to suggest admins draft it separately is that our webUI does not support common helpful features like "save", "undo", or any kind of history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The config policies will be consistent if set via webUI or CLI whether admins draft them separately or not. That makes it sound like there's a bug in our APIs or something.

Hmm, I guess I meant consistency on their end (so that they don't have one config used for the webUI policies and a different folder of configs whose paths are input into the CLI).
but that makes sense! I'll rephrase the benefits of the note

WebUI
=====

Expand Down Expand Up @@ -90,7 +95,7 @@ Administrators can set Config Policies at both the cluster and workspace levels.
CLI
===

Use the following command to manage workspace-level Config Policies via CLI:
Use the following command to manage Config Policies via CLI:

.. code:: bash
Expand Down
47 changes: 24 additions & 23 deletions docs/reference/cli-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,30 @@ help documentation. For example, to learn more about individual experiment comma
positional arguments:
command
help show help for this command
auth manage auth
agent (a) manage agents
command (cmd) manage commands
checkpoint (c) manage checkpoints
deploy (d) manage deployments
experiment (e) manage experiments
job (j) manage job
master (m) manage master
model (m) manage models
notebook manage notebooks
oauth manage OAuth
preview-search preview search
resources (res) query historical resource allocation
shell manage shells
slot (s) manage slots
task manage tasks (commands, experiments, notebooks,
shells, tensorboards)
template (tpl) manage config templates
tensorboard manage TensorBoard instances
trial (t) manage trials
user (u) manage users
version show version information
help show help for this command
auth manage auth
agent (a) manage agents
command (cmd) manage commands
checkpoint (c) manage checkpoints
deploy (d) manage deployments
experiment (e) manage experiments
job (j) manage job
master (m) manage master
model (m) manage models
notebook manage notebooks
oauth manage OAuth
preview-search preview search
resources (res) query historical resource allocation
shell manage shells
slot (s) manage slots
task manage tasks (commands, experiments, notebooks,
shells, tensorboards)
template (tpl) manage config templates
config-policies (cp) manage config policies
tensorboard manage TensorBoard instances
trial (t) manage trials
user (u) manage users
version show version information
optional arguments:
-h, --help show this help message and exit
Expand Down
11 changes: 7 additions & 4 deletions harness/determined/cli/config_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def delete_config_policies(args: argparse.Namespace) -> None:

args_description: cli.ArgsDescription = [
cli.Cmd(
"config-policies",
"config-policies cp",
None,
"manage config policies",
[
Expand All @@ -110,7 +110,8 @@ def delete_config_policies(args: argparse.Namespace) -> None:
"--workspace-name",
type=str,
required=False,
help="apply config policies to workspace",
help="get config policies from this workspace. When not specified, get "
"global config policies",
),
cli.Group(cli.output_format_args["json"], cli.output_format_args["yaml"]),
],
Expand Down Expand Up @@ -138,7 +139,8 @@ def delete_config_policies(args: argparse.Namespace) -> None:
"--workspace-name",
type=str,
required=False,
help="apply config policies to this workspace",
help="apply config policies to this workspace. When not specified, apply "
"global config policies",
),
],
),
Expand All @@ -158,7 +160,8 @@ def delete_config_policies(args: argparse.Namespace) -> None:
"--workspace-name",
type=str,
required=False,
help="apply config policies to workspace",
help="delete config policies from this workspace. When not specified, "
"delete global config policies",
),
],
),
Expand Down
Loading