influxdata / influxdata/openapi
GET buckets parameter 'after' not working
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
I'm preparing grace tests for getting buckets based on the contracts in the openapi project.
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
- Generate a large number of buckets (20+)
- send a GET request to
/bucketswith theafterparameter. e.g. (api/v2/buckets?after=d5ace01d1e86dda5)
Expected behavior:
Expect that the OpenAPI documents function as a source of truth for how the server works.
Since the swagger path /buckets/get/parameters includes a parameter 'After', expected that the set of returned buckets would begin with the bucket after the bucket with the id used as the value for the after parameter
from OpenAPI cloud.json
$ jq '.paths."/buckets".get.parameters[3]' cloud.json
{
"$ref": "#/components/parameters/After"
}
and
$ jq '.components.parameters.After' cloud.json
{
"in": "query",
"name": "after",
"required": false,
"schema": {
"type": "string"
},
"description": "Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`.\n"
}
Actual behavior:
Returns a set of buckets sorted by bucket.name alpha beginning with the lowest bucket.name and not beginning with the bucket following the bucket with the id used in the after parameter.
Environment info:
Testing against K8SIDPE Remocal. Last commit.
ommit 14551fd0caa8b0eacacc8f5c9f248090a873ff24 (HEAD -> master, origin/master, origin/alchemy/automatic, origin/HEAD)
Author: Hercules Mango Churchill <alchemy@influxdata.com>
Date: Thu Jun 2 01:14:08 2022 +0000
- System info: Run
uname -srmand copy the output here - InfluxDB version: Run
influxd versionand copy the output here - Other relevant environment details: Container runtime, disk info, etc
Screencasts from Postman
Basic GET - Success - to show the start of the bucket set

GET with offset and limit params - Success - to show that these params are working, also to get a bucket whose ID will be used for the after param.

GET with after param - Failure

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting cloud.json at the /buckets GET parameters and the components.parameters.After definition, then compare that contract with the server behavior shown in the reproduction steps. Determine where support for the non-inclusive after cursor belongs and verify that requests using a bucket ID return the subsequent buckets rather than restarting by name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100