-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: PLAT-1152 / add data studios 'list' command #475
Conversation
import picocli.CommandLine; | ||
|
||
@CommandLine.Command( | ||
name = "studios", // alternative "data-studio" |
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 rule is to follow the API, as we use studios in API this is correct, no need for data-studios
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.
btw. you can remove that comment then if everyone agrees
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.
Nice one! To me it looks goods. The only minor change I would do is to handle both error codes (404,403) in the list and view commands as Weronika mentioned.
I also think we can close the other PR, which only contains the view command in favor of this one, and merging these two commands in this PR.
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, left some minor comments. Nice job!
} | ||
if (e.getCode() == 403) { | ||
throw new TowerException(String.format("User not entitled to %s workspace", wspId)); | ||
} |
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.
You missed throw e;
here
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.
Good catch - thanks!
import picocli.CommandLine; | ||
|
||
@CommandLine.Command( | ||
name = "studios", // alternative "data-studio" |
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.
btw. you can remove that comment then if everyone agrees
Context
Adding new commands for interacting with data studios: https://seqera.atlassian.net/browse/PLAT-583
This PR includes changes on top of this related PR: #474
Testing
Get all data studios for a workspace:
Get list for workspace with pagination options supplied:
Get list for workspace with filter based on freetext or keyword search supplied: