After 6a9323a79 (Fix HDCA lost in tool form on rerun), visible HDCAs
in the current history were incorrectly added to the job_input_values
fallback section with a "(not in current history)" label. This happened
because active_visible_datasets_and_roles only iterates HDAs, so HDCAs
were never removed from job_input_values during matching. The HDCA then
appeared twice in the form: once correctly from the dataset collections
section, and once as a "keep" option with wrong state.
Skip HDCAs in the fallback loop when they are active, visible, and in
the current history — they are already properly handled by the
active_visible_dataset_collections loop below.
Fixes `lib/galaxy_test/selenium/test_tool_form.py::TestToolForm::test_rerun_dataset_collection_element - selenium.common.exceptions.TimeoutException: Message: Timeout waiting on CSS selector [.dataset-collection-panel] to become present.`
Fixes#22100. When a regular expression fails to match in apply_regex(),
the generic Exception was not caught by the API layer, resulting in an
unhandled server error. Using MessageException ensures the error message
is properly surfaced to users.
Tool IDs with special characters (e.g., "EMBOSS: isochore47") were
embedded into URL paths without percent-encoding. The space would be
lost in transit through RST→HTML→browser, causing the server to
reconstruct a GUID that didn't match any tool.
Apply urllib.parse.quote(safe="/") to the entire route_to_images path
so special characters are properly percent-encoded. The WSGI layer
auto-decodes PATH_INFO before routing, so the controller receives
the correct values.
Fixes https://github.com/galaxyproject/galaxy/issues/22126
When a DatasetCollectionElement containing an LDDA or nested child
collection (rather than an HDA) was used as a reference for dynamic
option filtering, _get_ref_data() failed to normalize it into a list,
causing "TypeError: 'DatasetCollectionElement' object is not iterable".
Use DatasetCollectionElement.dataset_instances which correctly returns
a list of dataset instances for all element types (HDA, LDDA, or
nested collections).
Fixes galaxyproject#22099
Commit 4172b9b5 ("Fix AttributeError serializing implicit output
collections during job prep") excluded all output_dataset_collections
from io_dicts when exclude_implicit_outputs=True. This broke mapped
dynamic collection outputs because their per-job DCs were no longer
serialized to outputs_new, so set_metadata.py could not discover and
populate them.
Selectively include output_dataset_collections where the name is not
in out_data — this excludes shared DCs for mapped dataset outputs
(which have N precreated elements with uninitialized sentinels) while
including per-job DCs for mapped collection outputs.
Add integration tests verifying no duplicate collection elements in
both non-mapped and mapped dynamic collection outputs with extended
metadata.
The job search HDCA signature comparison was non-deterministic because
`func.array_agg(column, order_by=column)` silently drops the `order_by`
keyword argument in SQLAlchemy, generating `array_agg(col)` instead of
`array_agg(col ORDER BY col)`.
This meant both the reference and candidate HDCA signatures were
aggregated in whatever scan order PostgreSQL happened to use. When the
query planner chose different scan orders for the reference and
candidate CTEs (which depends on table statistics and query plan), the
resulting arrays had different element orderings, causing the equality
comparison to fail — even for the exact same HDCA.
The fix uses `aggregate_order_by` from SQLAlchemy's PostgreSQL dialect,
which correctly generates `array_agg(col ORDER BY col ASC)`.
Diagnostic output from CI confirming the root cause:
reference full signature=['data0;251', 'data1;252', 'data2;253']
candidate full signatures=[(75, ['data2;253', 'data1;252', 'data0;251'])]
equivalent HDCA ids=[]
Same HDCA (id=75), same elements, different array ordering → no match.
Investigation details: https://gist.github.com/mvdbeek/a3bd1528be0985e4a7d36e929a502bd2Fixes#21230
Fixes https://github.com/galaxyproject/galaxy/issues/22283
map_match must be a dict with a given structure, see
```
def _resolve_map_match(self, map_match, path_info, controllers, use_default=True):
# Get the controller class
controller_name = map_match.pop("controller", None)
controller = controllers.get(controller_name, None)
if controller is None:
raise webob.exc.HTTPNotFound(f"No controller for {path_info}")
```
just below. So let's fail early if the dict is empty.
Also fail gracefully on non-unicode query params.
The Sentry crash (issue galaxyproject#22132) was triggered by a Python Requests 2.32
client sending an invalid payload.
In this case the input was
```json
{
"in": "custom",
"in|custom|mtx": {
"id": "f9cad7b01a472135e9dd0bb539e2d0de",
"src": "hda"
},
"in|custom|obs": {
"id": "f9cad7b01a472135068f117b3249ac19",
"src": "hda"
},
"in|custom|var": {
"id": "f9cad7b01a472135e497326e87a7fa84",
"src": "hda"
}
}
```
where `in` is a conditional and `adata_format` is the tester select that
you can in fact set to `custom`.
Replace the opaque AttributeError with a RequestParameterInvalidException
that tells the caller exactly what went wrong and how to fix their
parameter naming.
Fixes https://github.com/galaxyproject/galaxy/issues/22132
Datasets using the _F/_R naming convention (e.g. ERR042228_F.fq.gz /
ERR042228_R.fq.gz) were not being auto-paired. Add "Fs" filter to
COMMON_FILTERS in both frontend and backend, with detection ordered
after _R1/_R2 to avoid substring false matches.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests for hidden/deleted HDA display in the rerun form now use real
model.HistoryDatasetAssociation instances via _new_hda(), since these
go through the isinstance check in the job_input_values loop.
The MockHistoryDatasetAssociation (which stubs find_conversion_destination)
is retained only for conversion tests that go through the dataset matcher
path and never reach the isinstance branch.
Organize the flat list of ~30 collection tools into 6 labeled
subcategories (Build, Restructure, Filter, Pair and Combine,
Sort and Label, Extract) to help users find tools faster.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>