-
Notifications
You must be signed in to change notification settings - Fork 362
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: update CLI commands to work with global APIs #10089
Conversation
CM-576: in-review
✅ Deploy Preview for determined-ui canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10089 +/- ##
==========================================
- Coverage 54.43% 54.42% -0.01%
==========================================
Files 1262 1262
Lines 158901 158918 +17
Branches 3631 3631
==========================================
- Hits 86494 86490 -4
- Misses 72273 72294 +21
Partials 134 134
Flags with carried forward coverage won't be shown. Click here to find out more.
|
bd4a88e
to
02dae58
Compare
02dae58
to
440ec32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
fb9fd03
to
ea58719
Compare
ea58719
to
b381d36
Compare
print( | ||
"Successfully deleted " | ||
+ workload_type | ||
+ "config policies for workspace " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency: I would be great to use f-string here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the adding tests for all the behaviors!
"-w", | ||
"--workspace-name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why --workspace-name
and not --workspace
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am cool with changing this back to --workspace
, I guess I wanted to distinguish the param as a string rather than an int of the workspace ID, but any such misconception could easily be corrected with the det config-policies <command> help
@kkunapuli up to you! Should we go with --workspace-name
or --workspace
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... well I suppose --workspace-name
is not an unreasonable choice, since we take "project id" for det e create
.
Ugh, but I wish we had standardized the CLI on either names or ids everywhere and this wasn't a concern. But that isn't the fault of this pr, for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I wish we had standardized the CLI on either names or ids everywhere and this wasn't a concern.
Agreed! I think with workspaces for the most part, we take in the name in the CLI and then retrieve the ID in the command handling function before passing it to the APIs.
Hmm, looking at this comment from when the original work was merged, it seems like the suggestion from model dev was also to use --workspace-name
instead of --workspace
, so I changed this back!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's stick with workspace-name
. There's already precedence with notebooks
% det notebook start -h
-w WORKSPACE_NAME, --workspace-name WORKSPACE_NAME
workspace name (default: None)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha!
ok I'll change this back to --workspace-name
.
Users can specify --workspace
as a shorthand (or any substring shorter than "workspace-name") if they want to!
), | ||
cli.Arg( | ||
"--workspace", | ||
"config_file", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The det config-policies ...
CLI commands have not yet been released to customers! We are aiming to release this in 0.38.0
5e4dbf4
to
69fc4be
Compare
Ticket
CM-576
Description
Update CLI commands to work with global APIs
Test Plan
CI passes (automated testing)
Checklist
docs/release-notes/
See Release Note for details.