Project

General

Profile

Actions

Bug #10517

closed

[CLI] Default return fields should be consistent across SDKs

Added by Tom Morris over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
-
Start date:
11/10/2016
Due date:
% Done:

100%

Estimated time:
Story points:
-

Description

Not sure if this is an issue with the Ruby SDK or the `arv` command in the CLI SDK, but one of them appears to be selecting all fields as the default return rather than those fields that the API server consider the default.

There is additional detail in #9998 note-3.


Related issues

Related to Arvados - Bug #9998: Improve performance of API server when keep-balance retrieves collectionsResolvedTom Clegg09/08/2016

Actions
Related to Arvados - Bug #10521: [SDKs] [CLI] "arv collection list" retrieves manifest_text even if not explicitly selectedDuplicate11/11/2016

Actions
Actions #1

Updated by Joshua Randall over 7 years ago

There does not appear to be any problem with the Ruby SDK, just the CLI itself:

# ruby -r arvados <<'EOF'
arv = Arvados.new api_version: 'v1'
puts arv.collection.list
EOF
{:kind=>"arvados#collectionList", :etag=>"", :self_link=>"", :offset=>0, :limit=>100, :items=>[#<Arvados::A20072620::Collection:0x000000021894b0 @attributes_to_update={}, @attributes={:href=>"/collections/1xpz6-4zz18-rizx4cwtnrro5fq", :kind=>"arvados#collection", :etag=>"7gv53a7o4gb2aa8d3g1jjdmlm", :uuid=>"1xpz6-4zz18-rizx4cwtnrro5fq", :owner_uuid=>"1xpz6-tpzed-9bwbc97aj4p4jzl", :created_at=>"2016-10-31T19:10:21.506943000Z", :modified_by_client_uuid=>"1xpz6-ozdt8-ndiamwyuovqsou4", :modified_by_user_uuid=>"1xpz6-tpzed-9bwbc97aj4p4jzl", :modified_at=>"2016-10-31T19:10:21.506322000Z", :name=>"test1", :description=>nil, :properties=>{}, :portable_data_hash=>"83ad3dd91034ed6852f6b03efb28cfcf+54", :replication_desired=>nil, :replication_confirmed=>nil, :replication_confirmed_at=>nil, :expires_at=>nil}>, #<Arvados::A20072620::Collection:0x000000021893e8 @attributes_to_update={}, @attributes={:href=>"/collections/1xpz6-4zz18-0xtc8l2oioxbn6p", :kind=>"arvados#collection", :etag=>"55h6fgfpnwfekcw0j13j3nvab", :uuid=>"1xpz6-4zz18-0xtc8l2oioxbn6p", :owner_uuid=>"1xpz6-j7d0g-anonymouspublic", :created_at=>"2016-10-31T17:10:01.900801000Z", :modified_by_client_uuid=>nil, :modified_by_user_uuid=>"1xpz6-tpzed-000000000000000", :modified_at=>"2016-10-31T17:10:01.900243000Z", :name=>nil, :description=>nil, :properties=>{}, :portable_data_hash=>"d41d8cd98f00b204e9800998ecf8427e+0", :replication_desired=>nil, :replication_confirmed=>nil, :replication_confirmed_at=>nil, :expires_at=>nil}>], :items_available=>2}
Actions #2

Updated by Joshua Randall over 7 years ago

The issue seems to be that the `arv` CLI is adding `select=` to the query parameters.

Apparently if you don't mention `select` in the request query params, the API server returns its default. If you do mention select but don't set the value to anything, you get all the parameters.

It can be fixed either in the CLI or in the API server, depending on whether this is an API server feature or bug..?

# curl --insecure -H "Authorization: OAuth2 ${ARVADOS_API_TOKEN}" https://${ARVADOS_API_HOST}'/arvados/v1/collections?select='
{"kind":"arvados#collectionList","etag":"","self_link":"","offset":0,"limit":2,"items":[{"href":"/collections/1xpz6-4zz18-rizx4cwtnrro5fq","kind":"arvados#collection","etag":"5kyoz6w20j4khe1awqbh9ad6u","uuid":"1xpz6-4zz18-rizx4cwtnrro5fq","owner_uuid":"1xpz6-tpzed-9bwbc97aj4p4jzl","created_at":"2016-10-31T19:10:21.506943000Z","modified_by_client_uuid":"1xpz6-ozdt8-ndiamwyuovqsou4","modified_by_user_uuid":"1xpz6-tpzed-9bwbc97aj4p4jzl","modified_at":"2016-10-31T19:10:21.506322000Z","name":"test1","description":null,"properties":{},"portable_data_hash":"83ad3dd91034ed6852f6b03efb28cfcf+54","manifest_text":". 1bb8e23bcda1ae0b2d3cd483dadd341f+9208+A187dc99e7d18574d42e8630abc417d6572315023@5838fbb0 0:9208:README\n","unsigned_manifest_text":". 1bb8e23bcda1ae0b2d3cd483dadd341f+9208 0:9208:README\n","replication_desired":null,"replication_confirmed":null,"replication_confirmed_at":null,"expires_at":null},{"href":"/collections/1xpz6-4zz18-0xtc8l2oioxbn6p","kind":"arvados#collection","etag":"ao0rg0uq4n5w80j9y0ryejq08","uuid":"1xpz6-4zz18-0xtc8l2oioxbn6p","owner_uuid":"1xpz6-j7d0g-anonymouspublic","created_at":"2016-10-31T17:10:01.900801000Z","modified_by_client_uuid":null,"modified_by_user_uuid":"1xpz6-tpzed-000000000000000","modified_at":"2016-10-31T17:10:01.900243000Z","name":null,"description":null,"properties":{},"portable_data_hash":"d41d8cd98f00b204e9800998ecf8427e+0","manifest_text":"","unsigned_manifest_text":"","replication_desired":null,"replication_confirmed":null,"replication_confirmed_at":null,"expires_at":null}],"items_available":2}
# curl --insecure -H "Authorization: OAuth2 ${ARVADOS_API_TOKEN}" https://${ARVADOS_API_HOST}'/arvados/v1/collections'
{"kind":"arvados#collectionList","etag":"","self_link":"","offset":0,"limit":100,"items":[{"href":"/collections/1xpz6-4zz18-rizx4cwtnrro5fq","kind":"arvados#collection","etag":"7gv53a7o4gb2aa8d3g1jjdmlm","uuid":"1xpz6-4zz18-rizx4cwtnrro5fq","owner_uuid":"1xpz6-tpzed-9bwbc97aj4p4jzl","created_at":"2016-10-31T19:10:21.506943000Z","modified_by_client_uuid":"1xpz6-ozdt8-ndiamwyuovqsou4","modified_by_user_uuid":"1xpz6-tpzed-9bwbc97aj4p4jzl","modified_at":"2016-10-31T19:10:21.506322000Z","name":"test1","description":null,"properties":{},"portable_data_hash":"83ad3dd91034ed6852f6b03efb28cfcf+54","replication_desired":null,"replication_confirmed":null,"replication_confirmed_at":null,"expires_at":null},{"href":"/collections/1xpz6-4zz18-0xtc8l2oioxbn6p","kind":"arvados#collection","etag":"55h6fgfpnwfekcw0j13j3nvab","uuid":"1xpz6-4zz18-0xtc8l2oioxbn6p","owner_uuid":"1xpz6-j7d0g-anonymouspublic","created_at":"2016-10-31T17:10:01.900801000Z","modified_by_client_uuid":null,"modified_by_user_uuid":"1xpz6-tpzed-000000000000000","modified_at":"2016-10-31T17:10:01.900243000Z","name":null,"description":null,"properties":{},"portable_data_hash":"d41d8cd98f00b204e9800998ecf8427e+0","replication_desired":null,"replication_confirmed":null,"replication_confirmed_at":null,"expires_at":null}],"items_available":2}
Actions #3

Updated by Joshua Randall over 7 years ago

  • Category set to API
  • Status changed from New to Feedback
  • Assigned To set to Joshua Randall
  • % Done changed from 0 to 100

I've fixed this in the API server, assuming it is a bug and not a feature: https://github.com/curoverse/arvados/pull/52

Actions #4

Updated by Anonymous over 7 years ago

  • Status changed from Feedback to Resolved

Applied in changeset arvados|commit:b86543493dffefb1ec245f48550cfa9e0119f4d1.

Actions

Also available in: Atom PDF