[26.0] Fix AmbiguousColumn error in job search for tools with long input names#22167
Open
mvdbeek wants to merge 2 commits intogalaxyproject:release_26.0from
Open
[26.0] Fix AmbiguousColumn error in job search for tools with long input names#22167mvdbeek wants to merge 2 commits intogalaxyproject:release_26.0from
mvdbeek wants to merge 2 commits intogalaxyproject:release_26.0from
Conversation
PostgreSQL truncates identifiers longer than 63 bytes (NAMEDATALEN).
When two tool inputs share a long prefix differing only after the 63rd
character (e.g. deeply nested JBrowse assemblies|track_groups|...
parameters), their CTE column labels collide after truncation, causing
psycopg2.errors.AmbiguousColumn.
Add safe_label() that falls back to a unique `_input_{value_index}`
label when the formatted label exceeds 63 characters, and apply it to
all 5 sites that generate column labels in the job search query builder.
Fixes galaxyproject#22166
AmbiguousColumn error in job search for tools with long input names
AmbiguousColumn error in job search for tools with long input names
dannon
reviewed
Mar 18, 2026
Member
dannon
left a comment
There was a problem hiding this comment.
Is value_index guaranteed to be unique across different k values here? It resets to 0 for each key in the outer input_data.items() loop (line 550), so if two different long-named inputs each have one dataset, both would get fallback label _input_0.
value_index resets to 0 for each key in the input_data loop, so the
previous _input_{value_index} fallback could collide when two different
long-named inputs each had value_index=0. Use an md5 hash prefix of
the full label to ensure uniqueness.
Member
Author
|
That's a good point, 8c04986 should cover that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostgreSQL truncates identifiers longer than 63 bytes (NAMEDATALEN). When two tool inputs share a long prefix differing only after the 63rd character (e.g. deeply nested JBrowse assemblies|track_groups|... parameters), their CTE column labels collide after truncation, causing psycopg2.errors.AmbiguousColumn.
Add safe_label() that falls back to a unique
_input_{value_index}label when the formatted label exceeds 63 characters, and apply it to all 5 sites that generate column labels in the job search query builder.Fixes #22166
How to test the changes?
(Select all options that apply)
License