Actions
Bug #18801
closedRequesting ApiClientAuthorization object with select=["uuid"] returns 422
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
02/25/2022
Due date:
% Done:
100%
Estimated time:
(Total: 0.00 h)
Story points:
-
Release:
Release relationship:
Auto
Description
We've received a report about arvados-ws
getting errors from the API server.
This is what happens:
$ curl -k -G --data-urlencode 'select=["uuid"]' -H "Authorization: OAuth2 ---token---" https://example-host/arvados/v1/api_client_authorizations/some-valid-uuid {"errors":["//railsapi.internal/arvados/v1/api_client_authorizations/some-valid-uuid?select=%5B%22uuid%22%5D: 422 Unprocessable Entity: #\u003cActiveModel::MissingAttributeError: missing attribute: api_token\u003e (req-c2h9urh6s0p0xvowm555)"]}
The arvados-ws
services does a request like this and it has been doing it since 2017 (line 80):
RailsAPI attempts to access the api_token
field in an after_initialize
hook:
...but because the request does a select=["uuid"]
, that field isn't available.
Manual testing with arvbox
determined that this is a regression introduced in the 2.3.0 release.
Actions