Skip to content

Commit c0b39cc

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 b315803 commit c0b39cc

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
@@ -23582,6 +23582,11 @@ export interface components {
2358223582
* @description Whether test data for this tool is available.
2358323583
*/
2358423584
test_data_available?: boolean | null;
23585+
/**
23586+
* Tool IDs
23587+
* @description Tool shed tool IDs for workflow install requests.
23588+
*/
23589+
tool_ids?: string[] | null;
2358523590
/**
2358623591
* Tool name
2358723592
* @description The name of the requested tool.
@@ -23592,6 +23597,11 @@ export interface components {
2359223597
* @description Homepage or repository URL for the requested tool.
2359323598
*/
2359423599
tool_url?: string | null;
23600+
/**
23601+
* Workflow name
23602+
* @description Name of the workflow requiring these tools, if applicable.
23603+
*/
23604+
workflow_name?: string | null;
2359523605
};
2359623606
/** ToolRequestImplicitCollectionReference */
2359723607
ToolRequestImplicitCollectionReference: {
@@ -23683,6 +23693,11 @@ export interface components {
2368323693
* @description Whether test data for this tool is available.
2368423694
*/
2368523695
test_data_available?: boolean | null;
23696+
/**
23697+
* Tool IDs
23698+
* @description Tool shed tool IDs for workflow install requests.
23699+
*/
23700+
tool_ids?: string[] | null;
2368623701
/**
2368723702
* Tool name
2368823703
* @description The name of the requested tool.
@@ -23693,6 +23708,11 @@ export interface components {
2369323708
* @description Homepage or repository URL for the requested tool.
2369423709
*/
2369523710
tool_url?: string | null;
23711+
/**
23712+
* Workflow name
23713+
* @description Name of the workflow requiring these tools, if applicable.
23714+
*/
23715+
workflow_name?: string | null;
2369623716
};
2369723717
/**
2369823718
* ToolRequestState

0 commit comments

Comments
 (0)