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

cli: implement new share-status command #686

Closed
DaanRosendal opened this issue Nov 5, 2023 · 4 comments · May be fixed by #713
Closed

cli: implement new share-status command #686

DaanRosendal opened this issue Nov 5, 2023 · 4 comments · May be fixed by #713

Comments

@DaanRosendal
Copy link
Member

For the workflow sharing sprint, design and implement a share-status command allowing users to view who a workflow has been shared with.

For example, Alice enquires with whom she shared her myanalysis run 42:

reana-client share-status -w myanalysis.42
myanalysis.42 has been shared with:
- [email protected]
- [email protected]

The CLI could have JSON output for easy piping into user scripts (as the list, status etc commands):

reana-cilent share -w myanalysis.42 --json | jq
[ 
    "[email protected]",
    "[email protected]"
]
@tiborsimko
Copy link
Member

  1. Note that the output should also include expiry date. We could perhaps go for something similar to the list output:
$ reana-client share-status -w myanalysis.42
USER                   EXPIRY_DATE
[email protected]        9999-12-31T23:59:59
[email protected]     2023-11-05T18:41:57

The expiry date is optional, but it may be good to use some value for sorting purposes, and schema validation purposes, hence the illustrative use of year 9999 in the example above.

  1. We could also think about not showing the expiry date by default, and show it only when people use --include-expiry-date. In this case, the output of the original bare share-status command could be a simple list of values only, one user email per line:
$ reana-client share-status -w myanalysis.42
USER
[email protected]   
[email protected] 
  1. Note also that we shall later introduce sharing to groups, so the heading of USER may not be the best. We should take it into account whilst designing the CLI options and command output column names. We could later use perhaps USER_OR_GROUP, but we may want to come up with something more neutral or otherwise descriptive that would be independent of the notion of a user or a group, for example:
$ reana-client share-status -w myanalysis.42
SHARED_WITH            SHARE_EXPIRES
[email protected]        9999-12-31T23:59:59
[email protected]     2024-11-05T18:41:57
[email protected]         9999-12-31T23:59:59

We should consider this together with the CLI option names for the list command in #687.

@DaanRosendal
Copy link
Member Author

Since it's only two columns, I think providing both the user/group and the expiry date with the default command is nicer. I will work on implementing this command like you displayed in point 3.

On a different note, what do you think of share-list instead of share-status?

@tiborsimko
Copy link
Member

OT1H, share-list would be nicely understandable with respect to share-add and share-remove, and also nicely analogous to secrets-list.

OTOH, I would see one concern is that it might possibly create a confusion with the list command.

For example:

  • With whom am I sharing "foo" analysis? -> share-list -w foo
  • Who is sharing an analysis "foo" with me? -> list --shared-by=anybody --filter name=foo.
  • ... and what happens when one tries to do things like: list --shared-by=myself --filter name=foo.

This concern could be possibly alleviated if we prefix existing commands, such as:

  • create -> workflow-create
  • list -> workflow-list
  • ...
  • ls -> workspace-ls
  • ..

Then share-list and workflow-list wouldn't possibly be confusion-prone anymore. But such a renaming, keeping older compatibility option, is to be carefully pondered.

We can muse IRL about pros/cons about where we would like to go and see based on that?

@DaanRosendal
Copy link
Member Author

I really like the idea of using clear prefixes for commands to avoid any confusion. Commands like workflow-list and share-list are straightforward and distinct. On the other hand, when it comes to non-prefixed commands like close and stop, it's not immediately apparent what they do. If I had to guess between the two, I wouldn't be sure which one closes or stops an interactive session. Switching to more explicit commands like interactive-session-close and workflow-stop may require some adjustment for users, but it seems like a sensible trade-off for improved clarity. If backward compatibility is a concern, we could always maintain the current commands as aliases.

Implementing and testing these new commands, as well as maintaining backward compatibility with aliases, could take some effort. We should weigh whether the enhanced clarity justifies the resources required for this transition.

DaanRosendal added a commit to DaanRosendal/docs.reana.io that referenced this issue Nov 14, 2023
Adds a new command to the docs for retrieving whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Nov 14, 2023
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Nov 14, 2023
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client-go that referenced this issue Nov 14, 2023
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Nov 14, 2023
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-workflow-controller that referenced this issue Nov 14, 2023
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-commons that referenced this issue Nov 14, 2023
Adds `reana-server` and `reana-workflow-controller` OpenAPI
specifications for retrieving whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Nov 20, 2023
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Nov 21, 2023
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Mar 13, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Mar 13, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client-go that referenced this issue Mar 13, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-client that referenced this issue Mar 13, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared with.

Closes reanahub#686
DaanRosendal added a commit to DaanRosendal/reana-client-go that referenced this issue Mar 13, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Mar 13, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-workflow-controller that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-workflow-controller that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-workflow-controller that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-workflow-controller that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
DaanRosendal added a commit to DaanRosendal/reana-server that referenced this issue Mar 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
@mdonadoni mdonadoni moved this to In review in Workflow-Sharing Jul 19, 2024
mdonadoni pushed a commit to DaanRosendal/reana-server that referenced this issue Aug 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/reana-workflow-controller that referenced this issue Aug 20, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/reana-commons that referenced this issue Aug 20, 2024
Adds `reana-server` and `reana-workflow-controller` OpenAPI
specifications for retrieving whom a workflow is shared with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/reana-client that referenced this issue Aug 20, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub#686
mdonadoni pushed a commit to DaanRosendal/reana-client-go that referenced this issue Aug 20, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/docs.reana.io that referenced this issue Aug 20, 2024
Adds a new command to the docs for retrieving whom a workflow is shared
with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/reana-commons that referenced this issue Aug 29, 2024
Adds `reana-server` and `reana-workflow-controller` OpenAPI
specifications for retrieving whom a workflow is shared with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/reana-client that referenced this issue Aug 29, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub#686
mdonadoni pushed a commit to DaanRosendal/reana-server that referenced this issue Aug 29, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
mdonadoni pushed a commit to DaanRosendal/reana-workflow-controller that referenced this issue Aug 29, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
tiborsimko pushed a commit to DaanRosendal/reana-server that referenced this issue Sep 4, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
tiborsimko pushed a commit to DaanRosendal/reana-workflow-controller that referenced this issue Sep 4, 2024
Adds a new endpoint to retrieve whom a workflow is shared with.

Closes reanahub/reana-client#686
tiborsimko pushed a commit to DaanRosendal/reana-client-go that referenced this issue Sep 4, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub/reana-client#686
tiborsimko pushed a commit to DaanRosendal/reana-client that referenced this issue Sep 4, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub#686
tiborsimko pushed a commit to DaanRosendal/reana-client that referenced this issue Sep 4, 2024
Adds a new command to the CLI to retrieve whom a workflow is shared
with.

Closes reanahub#686
tiborsimko pushed a commit to DaanRosendal/docs.reana.io that referenced this issue Sep 4, 2024
Adds a new command to the docs for retrieving whom a workflow is shared
with.

Closes reanahub/reana-client#686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment