Open davelopez opened 5 months ago
More from the Matrix discussion and some further investigation:
Both state_details
and state_ids
are exposed in BioBlend.objects History
objects. These objects are generated from the query /api/histories/<encoded_history_id>
without parameters (i.e. the default detailed
view).
Currently state_details
, state_ids
and contents_states
are all dictionaries with dataset states as keys but return different things, e.g.:
contents_states
doesn't have all the states as keys, just the ones with at least one dataset in that statecontents_states
includes also top-level collections (hdcas), excludes deleted and hidden hdas/hdcasstate_details
includes only non-deleted hdas, excludes hdcasstate_ids
includes all hdas, excludes hdcasThen there's contents_active
which is a dictionary with keys deleted
, hidden
and active
, and includes both hdas and hdcas.
Not sure how, but it would be good to consolidate these.
From Backend-WG Matrix channel discussion:
When serializing histories, the difference between
state_details
(https://github.com/galaxyproject/galaxy/blob/3083b5ed384398bddd5d8d835b43c5bde3cd1328/lib/galaxy/managers/histories.py#L852) andcontents_states
(https://github.com/galaxyproject/galaxy/blob/3083b5ed384398bddd5d8d835b43c5bde3cd1328/lib/galaxy/managers/histories.py#L858) seems to be thatstate_details
only takes HDA states into account whilecontents_states
takes both HDA and HDCA states. There are also a bunch of 9-year-old "remove this" comments around those serializers 😓 Also,state_details
seems to be unused in the UI but used in many tests, whilecontents_states
is used in the UI but not in any test...Proposed solution in chat:
Let's try removing
state_details
and maybestate_ids
as well if possible.