Skip to content

Develop to Master merge, Release v7.2.0#218

Merged
alexskr merged 8 commits intomasterfrom
develop
May 2, 2026
Merged

Develop to Master merge, Release v7.2.0#218
alexskr merged 8 commits intomasterfrom
develop

Conversation

@alexskr
Copy link
Copy Markdown
Member

@alexskr alexskr commented May 2, 2026

alexskr and others added 8 commits April 28, 2026 01:34
Drops the `if page?` guard so /users unconditionally returns a Page
object. Adds a deterministic default sort (username asc) so paged
responses are stable for clients walking nextPage links.

Addresses production timeouts on /users?include=all. Pairs with
ncbo/ontologies_linked_data#286 (idempotent User#admin?, drop inverse
attrs from auth load) and the corresponding ontologies_api_ruby_client
auto-paginate change. Tests updated for the paged response shape and
cover ?pagesize and ?include=all combinations.
Commit 388d1bd ("converted acronyms filter from Boolean to Term syntax")
replaced get_quoted_field_query_param at the start of filter_query
construction in BOTH search_helper.rb (line 160) and
properties_search_helper.rb (line 48). The new term-syntax function
correctly early-returns "" for an empty acronyms list (an empty
terms-query would itself be malformed), but the rest of filter_query
construction in both helpers implicitly relied on the prior function's
vacuous `submissionAcronym:""` placeholder always producing a non-empty
starting clause.

When acronyms filtered to empty (e.g. ontology_types restriction matches
nothing, or the requesting user has no access to any of the requested
ontologies), filter_query was "" and the subsequent `<< " AND <clause>"`
appends produced a stray-AND fq that Solr rejected with 400 (surfaced
as 500 by the API), breaking both /search and /property_search for any
call whose acronyms resolved empty.

Fix: when filter_query is empty after the acronyms step, use Solr's
match-all literal `*:*`. AND'ing further clauses onto `*:*` narrows
correctly, producing well-formed queries semantically equivalent to the
constraints that follow. Also more correct than the pre-388d1bd
behavior, which always silently added `submissionAcronym:""` (matching
zero docs) when acronyms was empty — search-without-acronyms now
actually returns matches.

The third in-tree call site (search_helper.rb:181 — valueset_root_ids)
is unaffected: it's already guarded by `unless valueset_root_ids.empty?`
on the line above, so the function input is guaranteed non-empty.

Adds regression tests for both endpoints exercising the empty-acronyms
path via ontology_types=NONEXISTENT.
Fix: always paginate GET /users; /search 500 on empty acronym filter
@alexskr alexskr merged commit a36a23c into master May 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants