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

Workflow Executions: Share results #895

Open
wants to merge 51 commits into
base: main
Choose a base branch
from

Conversation

malchua
Copy link
Contributor

@malchua malchua commented Jan 13, 2025

What does this PR do and why?

Describe in detail what your merge request does and why.

This PR relates to STRY0016470, where we want to be able to share our workflow execution results to the project/group so that members are able to see the results. This PR covers issue #884

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.
image
image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Login as a user that is a member of a group.
  2. Select a project within that group.
  3. In the samples page for that project, create a workflow execution and check the box asking if you want to share the results with the project members.
  4. After creating the workflow execution, click on the Workflow Executions section on the sidebar of that project.
  5. Confirm that the workflow execution is present.
  6. Log out, then login as a different member that has access to the same group (the access level must be at least an Analyst)
  7. Go to the Workflow Executions page for the same project.
  8. Confirm that this member is also able to see the same workflow execution.
  9. Confirm that this member is not allowed to Cancel, Delete, or Edit this workflow execution.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

@malchua malchua force-pushed the workflow_execution/share_results branch from 2d4b702 to 0115044 Compare January 13, 2025 19:08

This comment has been minimized.

@malchua malchua force-pushed the workflow_execution/share_results branch from 93d1b1a to 493bce6 Compare January 27, 2025 04:35

This comment has been minimized.

This comment has been minimized.

@malchua malchua marked this pull request as ready for review January 27, 2025 14:39
Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 left a comment

Choose a reason for hiding this comment

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

Some comments below to start and also some clarification questions (maybe geared more towards @ericenns :

  1. I would think we need a Workflow Execution listing for groups now? I don't see anywhere to view a workflow that's been shared with the group
  2. Should the user that created a shared workflow still be able to cancel/delete/modify the workflow from their own personal workflow listing?
  3. Listing the user that created the shared workflow on the workflow summary tab?

Also, could the description header for the project workflow executions page be updated as it no longer pertains to only automated workflows:
image

app/components/nextflow_component.html.erb Outdated Show resolved Hide resolved
test/system/workflow_executions_test.rb Show resolved Hide resolved
@ericenns
Copy link
Member

Some comments below to start and also some clarification questions (maybe geared more towards @ericenns :

  1. I would think we need a Workflow Execution listing for groups now? I don't see anywhere to view a workflow that's been shared with the group
  2. Should the user that created a shared workflow still be able to cancel/delete/modify the workflow from their own personal workflow listing?
  3. Listing the user that created the shared workflow on the workflow summary tab?

Also, could the description header for the project workflow executions page be updated as it no longer pertains to only automated workflows: image

  1. Groups Workflow Executions listing will be accomplished in a separate PR.
  2. Yes the user that created a shared workflow should still be able to cancel/delete/modify the workflow from their own personal workflow listing.
  3. I think this could be handled in a separate PR, though maybe @deepsidhu85 would have suggestions on having a activity for this (but again that might be better as a follow up PR).

@malchua malchua force-pushed the workflow_execution/share_results branch from d639df0 to cb092a5 Compare January 28, 2025 19:36

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@ericenns ericenns left a comment

Choose a reason for hiding this comment

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

Left a few comments on implementation. I have not tried creating an automated workflow execution but we should ensure that the shared_with_namespace checkbox is not shown when creating an automated workflow execution as that would be confusing to the users.

app/components/nextflow_component.rb Outdated Show resolved Hide resolved
app/components/nextflow_component.html.erb Outdated Show resolved Hide resolved
samples: Sample.none,
allowed_to_update_samples: true,
namespace_id: @project.namespace.id,
fields: nil,
instance: @automated_workflow_execution
instance: @automated_workflow_execution,
namespace_type: @project.namespace.type,
Copy link
Member

Choose a reason for hiding this comment

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

nitpick (blocking): based off of comment above, this does not need to be passed in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed in 02741a9

app/views/projects/workflow_executions/show.html.erb Outdated Show resolved Hide resolved
app/views/projects/workflow_executions/show.html.erb Outdated Show resolved Hide resolved
app/views/projects/workflow_executions/show.html.erb Outdated Show resolved Hide resolved
@malchua malchua force-pushed the workflow_execution/share_results branch from 81c9d5b to ab067fb Compare January 30, 2025 16:42

This comment has been minimized.

Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 left a comment

Choose a reason for hiding this comment

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

Some more comments below.

Maybe out of scope of this PR (@ericenns) but users with access to shared workflows are unable to export them which I imagine is part of the reason for sharing workflows?

Comment on lines 113 to 114
<div class="flex items-center h-5 mb-4">
<% if [email protected] && @namespace_type %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you flip these (and their closing tags) so that you don't render the empty div

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 4628876

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're also correct that the other project members should be able to export. Should be fixed in 85f9079

Copy link
Collaborator

Choose a reason for hiding this comment

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

Building on this, could you fix the path within the export preview to navigate to the workflow within the project if it's shared:
image

Currently it will navigate to the workflow as if it's owned by the user (which would be inaccessible), but if shared, we want to access it through the project (hopefully that makes sense).
Please also add associated UI tests for creating export from a shared workflow and clicking a shared link navigates to the expected page. There are similar tests in test/system/data_exports_test that you can draw from.

test/system/projects/workflow_executions_test.rb Outdated Show resolved Hide resolved
test/system/workflow_executions_test.rb Outdated Show resolved Hide resolved
test/system/workflow_executions_test.rb Outdated Show resolved Hide resolved
Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 left a comment

Choose a reason for hiding this comment

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

One more comment while playing around

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants