Skip to content

Commit 174240b

Browse files
committed
Merge branch 'release_25.0' into release_25.1
2 parents cc854da + 5fdc8b9 commit 174240b

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

client/src/api/schema/schema.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15201,9 +15201,11 @@ export interface components {
1520115201
* Errors
1520215202
* @description Errors associated with the invocation.
1520315203
*/
15204-
errors?: {
15205-
[key: string]: unknown;
15206-
} | null;
15204+
errors?:
15205+
| {
15206+
[key: string]: unknown;
15207+
}[]
15208+
| null;
1520715209
/**
1520815210
* Galaxy Version
1520915211
* @description The version of Galaxy this object was generated with.

lib/galaxy/managers/markdown_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def handle_error(self, container, line, error):
512512

513513
class ReadyForExportMarkdownDirectiveHandler(GalaxyInternalMarkdownDirectiveHandler):
514514
def __init__(self, trans, extra_rendering_data=None):
515-
extra_rendering_data = extra_rendering_data or {}
515+
extra_rendering_data = extra_rendering_data if extra_rendering_data is not None else {}
516516
self.trans = trans
517517
self.extra_rendering_data = extra_rendering_data
518518

lib/galaxy/schema/invocation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class InvocationReport(Model, WithModelClass):
464464
generate_time: Optional[str] = schema.GenerateTimeField
465465
generate_version: Optional[str] = schema.GenerateVersionField
466466

467-
errors: Optional[dict[str, Any]] = Field(
467+
errors: Optional[list[dict[str, Any]]] = Field(
468468
default=None,
469469
title="Errors",
470470
description="Errors associated with the invocation.",

lib/galaxy_test/api/test_workflows.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,6 +3564,52 @@ def test_workflow_invocation_report_custom(self):
35643564
assert "## Workflow Inputs" in markdown_content
35653565
assert "## About This Report" in markdown_content
35663566

3567+
@skip_without_tool("cat")
3568+
def test_workflow_invocation_report_invalid_hdca_id(self):
3569+
"""Test that an invalid HDCA id is reported in errors."""
3570+
workflow_with_unknown_directive = """
3571+
class: GalaxyWorkflow
3572+
name: Workflow With Unknown Directive
3573+
inputs:
3574+
input_1: data
3575+
outputs:
3576+
output_1:
3577+
outputSource: first_cat/out_file1
3578+
steps:
3579+
first_cat:
3580+
tool_id: cat
3581+
in:
3582+
input1: input_1
3583+
report:
3584+
markdown: |
3585+
## Test Report
3586+
3587+
```galaxy
3588+
history_dataset_collection_display(history_dataset_collection_id=1000000)
3589+
```
3590+
"""
3591+
test_data = """
3592+
input_1:
3593+
value: 1.bed
3594+
type: File
3595+
"""
3596+
with self.dataset_populator.test_history() as history_id:
3597+
summary = self._run_workflow(workflow_with_unknown_directive, test_data=test_data, history_id=history_id)
3598+
workflow_id = summary.workflow_id
3599+
invocation_id = summary.invocation_id
3600+
# Fetch the report - errors should be collected in the response
3601+
report_response = self._get(f"workflows/{workflow_id}/invocations/{invocation_id}/report")
3602+
self._assert_status_code_is(report_response, 200)
3603+
response_json = report_response.json()
3604+
# Check that errors were collected
3605+
assert "errors" in response_json
3606+
assert response_json["errors"] is not None
3607+
assert len(response_json["errors"]) > 0
3608+
# Verify the error message mentions the actual error
3609+
error_entry = response_json["errors"][0]
3610+
assert "error" in error_entry
3611+
assert "History dataset collection association not found" in error_entry["error"]
3612+
35673613
@skip_without_tool("cat1")
35683614
def test_export_invocation_bco(self):
35693615
with self.dataset_populator.test_history() as history_id:

0 commit comments

Comments
 (0)