-
Notifications
You must be signed in to change notification settings - Fork 51
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
fix(152): cml ls --all-users display wrong owner #154
fix(152): cml ls --all-users display wrong owner #154
Conversation
alternative fix to pr 153: - inside `ls` command, make 1 API call to get users and create a mapping owner_id (uuid)-> username - updated `list_lab_table` and `print_table` signatures to take the `ownerids_usernames` mapping - add new mock for `GET /users` in `MockCMLServer`
Pull Request Test Coverage Report for Build 9703376108Details
💛 - Coveralls |
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 like the simplicity of this approach, but the plugin API needs to change.
virl/cli/ls/commands.py
Outdated
@@ -47,4 +49,4 @@ def ls(all, all_users): | |||
pl = ViewerPlugin(viewer="lab") | |||
pl.visualize(labs=labs, cached_labs=cached_labs) |
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 think the API needs to change here as well.
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 would also mean a doc change.
Another way, to avoid the function signature change, we could set an attribute to the lab object:
or equivalent but I am not sure how you feel about that |
No, I don't like this as it changes the underlying CML API. That's more surprising for plugin developers. I like your map approach. |
Pull Request Test Coverage Report for Build 9736239689Details
💛 - Coveralls |
Indeed, a bit hackish. I have found some bugs with the users and groups, plus plugin doc is missing. I have the changes staged. Happy to submit another Issue and/or PR or commit here. |
alternative fix to #152 (other PR #153):
ls
command, make 1 API call to get users and create a mapping owner_id (uuid)-> usernamelist_lab_table
andprint_table
signatures to take theownerids_usernames
mappingGET /users
inMockCMLServer