Files
galaxy/test/functional/tools/data_manager.xml
T
mvdbeek 1b4e6ceff1 Fix DataManagerTool.exec_after_process for async API submission
When a data manager job is submitted via POST /api/jobs (async path), the
Celery task reconstructs the tool from raw XML without a data_manager_id,
causing DataManagerJobAssociation to store the tool XML id instead of the
conf id when those differ. exec_after_process then fails with "Invalid data
manager requested" because DataManagers registry is keyed by conf id.

Fix by preferring self.data_manager_id (always set correctly at toolbox load
time) over job.data_manager_association.data_manager_id in exec_after_process.

Add a regression test using the "data_manager" test tool (tool XML id) which
is registered in sample_data_manager_conf.xml as id="test_data_manager",
replicating the exact id mismatch seen in production (e.g. bowtie2).
2026-06-15 08:56:03 +02:00

19 lines
775 B
XML

<tool id="data_manager" name="Test Data Manager" tool_type="manage_data" version="0.0.1">
<configfiles>
<configfile name="static_test_data">{"data_tables": {"testbeta": [{"value": "asyncvalue", "path": "asyncvalue.txt"}]}}</configfile>
</configfiles>
<command detect_errors="exit_code">
mkdir $out_file.files_path ;
echo "A new value" > '$out_file.files_path/asyncvalue.txt';
cp '$static_test_data' '$out_file';
exit $exit_code
</command>
<inputs>
<param type="text" name="ignored_value" value="" label="Ignored" />
<param type="integer" name="exit_code" value="0" label="Exit code"/>
</inputs>
<outputs>
<data name="out_file" format="data_manager_json"/>
</outputs>
</tool>