Skip to content

Add a "Debug" (email report) tab to Workflow Invocations #20624

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

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

ahmedhamidawan
Copy link
Member

@ahmedhamidawan ahmedhamidawan commented Jul 8, 2025

Fixes #20569

NOTE: The tab has been renamed to Debug instead of Feedback

add_error_tab_in_invocation_view.mp4
  • Adds a new tab for reporting any issues with invocations.
  • Finds and shows steps with failed jobs, and workflow invocation message(s) if they exist.
  • Adds a reusable EmailReportForm component which shows the user's email and has a text field. It requires a submit method as prop which it waits for to show any response messages.
  • Makes sure this reusable email component only allows the current user to email reports related to their own jobs/invocations. Decided against this because in the past we have even allowed anon reports. Although, added a conditional which in the case of invocation reports enforces log in at the very least.
  • Adds a backend endpoint for POST /api/invocations/{invocation_id}/error

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@mvdbeek
Copy link
Member

mvdbeek commented Jul 9, 2025

  • Uses store to cache step jobs summary: no need to fetch it over and over if an invocation is terminal.

Can you open a separate PR for this please ?

@ahmedhamidawan
Copy link
Member Author

ahmedhamidawan commented Jul 10, 2025

One of the changes made here is that error reporting can only be done by the user who ran the job or invocation. So, this affects the existing bug reporting for jobs/datasets as well where the form is not rendered if you're looking at another user's public failed dataset like so:

Before After
firefox_SFGq8BoYw8 Xhk5WPxaQl

This makes sense, right? Especially when it comes to reporting problems for invocations (only the user who owns the history and ran the workflow can report feedback)?

Note:

I do see that (before my changes) in case a different user (or even an anonymous user) reported a job error, we would see the following in the email:

image
(here, test is the reporting user, and ahmedawan7 is the original job running user)

@ahmedhamidawan
Copy link
Member Author

ahmedhamidawan commented Jul 10, 2025

One of the changes made here is that error reporting can only be done by the user who ran the job or inv...

About this ^

I now see #5791

So we are okay with anon (and hence, I'll assume also different) users making these reports.

I'll revert that change then, and allow anyone to make these reports, regardless of who ran the job/workflow.

UPDATE: I've gone ahead and done that; removed a few commits, bug reporting for dataset/job errors remains unchanged. Although, added a conditional which in the case of invocation reports enforces log in at the very least.

@ahmedhamidawan ahmedhamidawan force-pushed the add_error_tab_in_invocation_view branch from b018699 to 38e3623 Compare July 17, 2025 14:34
@ahmedhamidawan ahmedhamidawan changed the title [WIP] Add a "Feedback" tab to Workflow Invocations Add a "Feedback" tab to Workflow Invocations Jul 17, 2025
@ahmedhamidawan ahmedhamidawan marked this pull request as ready for review July 17, 2025 21:03
@github-actions github-actions bot added this to the 25.1 milestone Jul 17, 2025
@mvdbeek mvdbeek self-requested a review July 29, 2025 14:18
@ahmedhamidawan
Copy link
Member Author

ahmedhamidawan commented Jul 29, 2025

  • Change tab name from Feedback to Debug.

@jmchilton , I reckon I should still keep the component name as WorkflowInvocationFeedback, since the user/researcher is submitting "feedback" on an invocation that has an error. The invocation debugging feature you have planned could go into a parent component (set of components etc.).

@ahmedhamidawan ahmedhamidawan changed the title Add a "Feedback" tab to Workflow Invocations Add a "Debug" (email report) tab to Workflow Invocations Jul 29, 2025
@ahmedhamidawan ahmedhamidawan force-pushed the add_error_tab_in_invocation_view branch from 69cd564 to 6fe07ab Compare July 29, 2025 17:05
ahmedhamidawan and others added 11 commits July 30, 2025 10:44
This does not implement the backend API POST route for actually submitting an email yet. That part is also left draft in the client.

This commit:
- Adds the new tab for reporting any issues with invocations.
- Finds and shows steps with failed jobs, and workflow invocation message(s) if they exist.
- Adds a reusable `EmailReportForm` component which shows the user's email and has a text field. It requires a `submit` method as prop which it waits for to show any response messages.
The current error reporting infrastructure in the backend is geared towards job/dataset errors. So, I do feel it is a little awkward that the invocation error report is implemented under `lib/galaxy/tools*`. Maybe we can improve on this and generalize reporting for many things.
The child component here already handles showing error messages.
@jmchilton
Copy link
Member

#20735 this is my dream for next steps.

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

Successfully merging this pull request may close these issues.

Create a Report Error Tab in Invocations
3 participants