Skip to content

Commit db2f14a

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 702da4d commit db2f14a

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
@@ -23583,6 +23583,11 @@ export interface components {
2358323583
* @description Whether test data for this tool is available.
2358423584
*/
2358523585
test_data_available?: boolean | null;
23586+
/**
23587+
* Tool IDs
23588+
* @description Tool shed tool IDs for workflow install requests.
23589+
*/
23590+
tool_ids?: string[] | null;
2358623591
/**
2358723592
* Tool name
2358823593
* @description The name of the requested tool.
@@ -23593,6 +23598,11 @@ export interface components {
2359323598
* @description Homepage or repository URL for the requested tool.
2359423599
*/
2359523600
tool_url?: string | null;
23601+
/**
23602+
* Workflow name
23603+
* @description Name of the workflow requiring these tools, if applicable.
23604+
*/
23605+
workflow_name?: string | null;
2359623606
};
2359723607
/** ToolRequestImplicitCollectionReference */
2359823608
ToolRequestImplicitCollectionReference: {
@@ -23684,6 +23694,11 @@ export interface components {
2368423694
* @description Whether test data for this tool is available.
2368523695
*/
2368623696
test_data_available?: boolean | null;
23697+
/**
23698+
* Tool IDs
23699+
* @description Tool shed tool IDs for workflow install requests.
23700+
*/
23701+
tool_ids?: string[] | null;
2368723702
/**
2368823703
* Tool name
2368923704
* @description The name of the requested tool.
@@ -23694,6 +23709,11 @@ export interface components {
2369423709
* @description Homepage or repository URL for the requested tool.
2369523710
*/
2369623711
tool_url?: string | null;
23712+
/**
23713+
* Workflow name
23714+
* @description Name of the workflow requiring these tools, if applicable.
23715+
*/
23716+
workflow_name?: string | null;
2369723717
};
2369823718
/**
2369923719
* ToolRequestState

0 commit comments

Comments
 (0)