microsoft / ga4gh-tes

C# implementation of the GA4GH TES API; provides distributed batch task execution on Microsoft Azure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagination and tags filter improvements

BMurri opened this issue · comments

Problem:
Two issues (either one may be considered a bug):

  1. It appears that the compliance test cannot interleave tag_key' & tag_value's and expects a shorter tag_value array to mean that the unmatched tag_key elements at the end are the ones intended to be unmatched.
  2. Pagination best practices as described here include the following advice (When clients pass in query parameters in addition to a page token, the service must fail the request if the query parameters are not consistent with the page token.).

Solution:
For 1. we should change the current backup tag filtering method to allow tagValues.Length to be <= tagKeys.Length and to effectively extend tagValues to be the same length as tagKeys by adding empty string.
For 2. we should encode all filter arguments into NextPageToken (pageSize is NOT a filter argument for this purpose) and when finding page_token decode the filter arguments. If any arguments are found they must all match, otherwise return BadRequest, if none were received use the values decoded from the token.

Code dependencies
Will this require code changes in:

  • CoA, for new and/or existing deployments? No
  • TES standalone, for new and/or existing deployments? No
  • Terra, for new and/or existing deployments? No
  • Build pipeline? No
  • Integration tests? No

Additional context
This is related to the implementation in #342.