Skip to content

Commit 252a8d2

Browse files
committed
feat: add workflow missing-tools install request button
When a workflow run fails because required tools are not installed, Galaxy now detects which tools are missing and surfaces a one-click 'Request Installation' button so users can notify admins without leaving the workflow run page. Backend changes: - workflows.py: pass missing_tool_ids as extra_error_info on the MessageException so the list is serialised into the JSON error response - notifications.py: add optional tool_ids and workflow_name fields to ToolRequestNotificationContent so admin notifications include the workflow context - tool_request_form.py: mirror the same two fields on ToolRequestFormData and wire them through to the notification content - test_tool_request_form.py: add integration test that submits a request with tool_ids + workflow_name and verifies both appear in the admin notification Frontend changes (client/src/components/Workflow/Run/): - services.js: add WorkflowMissingToolsError class (extends Error, carries missingToolIds[]); update getRunData() catch to detect missing_tool_ids in the error response and throw the typed error before rethrowSimple() would strip structured data - WorkflowMissingToolsRequest.vue: new component — shows a button with count badge, a GModal confirmation dialog, and uses localStorage keyed on the sorted tool-ID set to disable the button after a successful request (avoids hammering); hidden for anonymous users and when the feature flag enable_tool_request_form is false; falls back gracefully when workflowName is not yet available - WorkflowMissingToolsRequest.test.ts: 25-test suite covering visibility rules (feature flag, anonymous, empty IDs), cancel path, payload shape, singular/plural copy, localStorage deduplication, storage-key sorting, in-flight disabled state, error recovery/retry, and modal re-open - WorkflowRun.vue: import and render WorkflowMissingToolsRequest inside the danger BAlert when a WorkflowMissingToolsError is caught; call getWorkflowInfo() as a best-effort fallback to populate workflowName on both the standard and instance (props.instance) code paths - schema.ts: add tool_ids and workflow_name to ToolRequestFormData type
1 parent d777a95 commit 252a8d2

9 files changed

Lines changed: 686 additions & 9 deletions

File tree

client/src/api/schema/schema.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23652,6 +23652,11 @@ export interface components {
2365223652
* @description Whether test data for this tool is available.
2365323653
*/
2365423654
test_data_available?: boolean | null;
23655+
/**
23656+
* Tool IDs
23657+
* @description Tool shed tool IDs for workflow install requests.
23658+
*/
23659+
tool_ids?: string[] | null;
2365523660
/**
2365623661
* Tool name
2365723662
* @description The name of the requested tool.
@@ -23662,6 +23667,11 @@ export interface components {
2366223667
* @description Homepage or repository URL for the requested tool.
2366323668
*/
2366423669
tool_url?: string | null;
23670+
/**
23671+
* Workflow name
23672+
* @description Name of the workflow requiring these tools, if applicable.
23673+
*/
23674+
workflow_name?: string | null;
2366523675
};
2366623676
/** ToolRequestImplicitCollectionReference */
2366723677
ToolRequestImplicitCollectionReference: {
@@ -23753,6 +23763,11 @@ export interface components {
2375323763
* @description Whether test data for this tool is available.
2375423764
*/
2375523765
test_data_available?: boolean | null;
23766+
/**
23767+
* Tool IDs
23768+
* @description Tool shed tool IDs for workflow install requests.
23769+
*/
23770+
tool_ids?: string[] | null;
2375623771
/**
2375723772
* Tool name
2375823773
* @description The name of the requested tool.
@@ -23763,6 +23778,11 @@ export interface components {
2376323778
* @description Homepage or repository URL for the requested tool.
2376423779
*/
2376523780
tool_url?: string | null;
23781+
/**
23782+
* Workflow name
23783+
* @description Name of the workflow requiring these tools, if applicable.
23784+
*/
23785+
workflow_name?: string | null;
2376623786
};
2376723787
/**
2376823788
* ToolRequestState

0 commit comments

Comments
 (0)