Project

General

Profile

Actions

Bug #22061

open

RailsAPI unhandled exception when calling groups/contets with select and distinct

Added by Brett Smith 4 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
-

Description

>>> arv.groups().contents(select=['owner_uuid'], distinct=True).execute()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/arvados/pyclients/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/opt/arvados/pyclients/lib/python3.8/site-packages/googleapiclient/http.py", line 938, in execute
    raise HttpError(resp, content, uri=self.uri)
arvados.errors.ApiError: <HttpError 422 when requesting https://pirca.arvadosapi.com/arvados/v1/groups/contents?select=%5B%22owner_uuid%22%5D&distinct=true&alt=json returned "//railsapi.internal/arvados/v1/groups/contents?cluster_id=&count=&distinct=true&include=&offset=0&select=%5B%22owner_uuid%22%5D: 422 Unprocessable Entity: #<ActiveRecord::StatementInvalid: PG::InvalidColumnReference: ERROR:  for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ...p() IS TRUE))) AND (groups.uuid is NULL) ORDER BY "groups"."...
                                                             ^
: SELECT  DISTINCT groups."owner_uuid" FROM "groups" WHERE (NOT (((groups.owner_uuid IN (SELECT group_uuid FROM trashed_groups WHERE trash_at <= statement_timestamp())) OR groups.trash_at <= statement_timestamp() IS TRUE))) AND (groups.uuid is NULL) ORDER BY "groups"."id" ASC LIMIT $1 OFFSET $2> (req-f11fqvwkrgdew52332u2)">

No data to display

Actions

Also available in: Atom PDF