Pagination and tags filter improvements
BMurri opened this issue · comments
Problem:
Two issues (either one may be considered a bug):
- It appears that the compliance test cannot interleave
tag_key
' &tag_value
's and expects a shortertag_value
array to mean that the unmatchedtag_key
elements at the end are the ones intended to be unmatched. - 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?
NoTES standalone, for new and/or existing deployments?
NoTerra, for new and/or existing deployments?
NoBuild pipeline?
NoIntegration tests?
No
Additional context
This is related to the implementation in #342.