influxdata / influxdata/influxdb
/dashboards GET - some query params declared in openapi are not implemented in cloud
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. in the openapi project look at the GET method and the parameters listed in the document `src/common/paths/dashboards.yml`
* offset
* limit
* descending
* owner
* sortBy
* id
* orgID
* org
2. create a set of 20+ dashboards in influx
3. progressively try each of the parameters declared in the openapi document
__Expected behavior:__
Expected that the results of GET would change with each new request and that they would reflect each parameter value used.
__Actual behavior:__
The following shows results of changing a parameter and then mapping the resulting dashboards to an array containing only the dashboard names to simplify comparison. Base names is the result from GET without parameters. Dbrd names is the result from GET with the indicated parameter. BTW - why is there not a sortBy name in the sortBy enum?
```
offset=5
DEBUG: base names Sb5ae680,Y63786f5,U74284df,Cebece96,N6ec6c50,P1ea1264,Tda1294c,Kf53a30e,O0b19c8f,Yd07837b,N5448c50,Pdf80cf4,Oba2ab45,Va490f5e,H1010b58,Sb3b7fd6,D3a3b8f4,Iecd8724,Wb6310ef,Sc3bcc41,C326bcec,Od5e10c9,O6fd98ac,X304955e,Madd62e9,Zc99a86f
DEBUG: dbrd names Sb5ae680,Y63786f5,U74284df,Cebece96,N6ec6c50,P1ea1264,Tda1294c,Kf53a30e,O0b19c8f,Yd07837b,N5448c50,Pdf80cf4,Oba2ab45,Va490f5e,H1010b58,Sb3b7fd6,D3a3b8f4,Iecd8724,Wb6310ef,Sc3bcc41,C326bcec,Od5e10c9,O6fd98ac,X304955e,Madd62e9,Zc99a86f
descending=true
DEBUG: base names J700c248,Ueb20554,Nd73acad,Oc0e6a4b,C566ee3d,Uc30b7ba,R397835a,Zf6ab688,U92bc55b,Lcaa1907,A994f75c,T214a8f1,C1b732b0,Ncc87e08,M8650230,N8e1de98,Qb9f1f0c,X186e7e1,Gaca945a,Q86d8c4b,M7158b27,U77c85fb,Va67d9dd,Wdfd7549,Ja6c884d,D91f4ce8
DEBUG: dbrd names D91f4ce8,Ja6c884d,Wdfd7549,Va67d9dd,U77c85fb,M7158b27,Q86d8c4b,Gaca945a,X186e7e1,Qb9f1f0c,N8e1de98,M8650230,Ncc87e08,C1b732b0,T214a8f1,A994f75c,Lcaa1907,U92bc55b,Zf6ab688,R397835a,Uc30b7ba,C566ee3d,Oc0e6a4b,Nd73acad,Ueb20554,J700c248
limit=3
DEBUG: base names H35ce449,O28c5137,W6ebecd6,Gc1a6f96,Af01fdcb,V11c92ad,Nb8bc2bd,Z097fd52,L9a22414,Bd064c29,Te3bc0f0,Zfb18c78,Fb152682,J51ddc8a,R9c3248d,O9ca81d5,S9e78340,Z5c96d7e,Ef492eee,Rf69c128,J5f85be6,K9aef099,U8e03a6d,Ze40bc23,N6e09af5,H1f50259
DEBUG: dbrd names H35ce449,O28c5137,W6ebecd6,Gc1a6f96,Af01fdcb,V11c92ad,Nb8bc2bd,Z097fd52,L9a22414,Bd064c29,Te3bc0f0,Zfb18c78,Fb152682,J51ddc8a,R9c3248d,O9ca81d5,S9e78340,Z5c96d7e,Ef492eee,Rf69c128,J5f85be6,K9aef099,U8e03a6d,Ze40bc23,N6e09af5,H1f50259
owner=${helpers.genSafeIDHexString(16)}
DEBUG: base names Ddc3cd6b,X1da9621,T88fd947,L2d5079a,Hcd10df4,Ea534ebf,Hbdef25e,G4b1d9f3,O14787d0,Ge56077b,Wfe03392,H8ec582b,U7e34679,S0a04b79,S087452d,Ie5b391e,T28093d3,Mb930de8,M4193737,S033bcdb,Ie6a1782,G7956fe1,Zd8efd7a,Mb7e5269,I2095b95,Ve7032e8
DEBUG: dbrd names Ddc3cd6b,X1da9621,T88fd947,L2d5079a,Hcd10df4,Ea534ebf,Hbdef25e,G4b1d9f3,O14787d0,Ge56077b,Wfe03392,H8ec582b,U7e34679,S0a04b79,S087452d,Ie5b391e,T28093d3,Mb930de8,M4193737,S033bcdb,Ie6a1782,G7956fe1,Zd8efd7a,Mb7e5269,I2095b95,Ve7032e8
sortBy=ID
DEBUG: base names Jab54ae5,Ld2a87a6,N9332226,S0671aab,Ld708279,X062a8f3,Q9fb480c,Z3de0752,W2e55de0,O9078109,U5726d20,I80d79e8,Ze4c3783,Xc5ba9da,S5cd10e5,Aea379ce,Xe4d9f55,B91a84a9,U8e14b30,G21cb571,M840b8b0,D66872ab,Y6bd801f,C9d8ce5b,M734930f,I696e808
DEBUG: dbrd names Jab54ae5,Ld2a87a6,N9332226,S0671aab,Ld708279,X062a8f3,Q9fb480c,Z3de0752,W2e55de0,O9078109,U5726d20,I80d79e8,Ze4c3783,Xc5ba9da,S5cd10e5,Aea379ce,Xe4d9f55,B91a84a9,U8e14b30,G21cb571,M840b8b0,D66872ab,Y6bd801f,C9d8ce5b,M734930f,I696e808
orgID=${helpers.genSafeIDHexString(16)}
DEBUG: base names U2009ef0,R8b2d8c0,Gdc848b8,T51f7e07,Z397e382,Y68f2acf,H2426de2,Padb6d84,B150faa9,Pb9d9cba,Lfdc16b5,Q2789e24,T026273b,Y0567665,L93cd88b,Ha7f2348,L9b53cd7,T8cf370f,Rf2932ea,T44d858b,Pc268c46,Ha4aa45a,Nf03617a,Ff196fca,W873775b,Jf12a24d
DEBUG: dbrd names
org=foo
Error: expected 200 "OK", got 403 "Forbidden"
id=0a5d037ec8199000
DEBUG: base names V68f17b8,U833cf3e,T95345c2,R45929ce,D8734db6,N2cc3f88,Cf324186,Aeb5d2b5,E5c9305c,Mf0c6611,Hfe0dd88,Bb8d776b,T43fc36a,Waf1c276,H54cf4db,Qc738901,Tf255813,W13b13b3,Gc76ce4c,Q3d22b66,Jbf3751f,Fd8ead3b,M870382b,J4b19bb8,V23c322d,H214cff9
DEBUG: dbrd names U833cf3e
id=0a5d04fd2e999000&id=0a5d050643d99000
DEBUG: base names Adc4e722,Ef1819b2,Y9262151,Tbce0be7,X2c2bbfa,U1a565c2,Cbe3b601,U306c26b,Ga87e6cb,Q4a4ada0,H4c23d5b,Sa9151af,V1edcf8d,U0359f17,Gf978db8,Fb33ac03,We1f40f8,B6e457b7,A426e0be,B66e2c91,Z6a16996,F625544a,L197df63,G75984b2,H18ca7a9,Y5d321a5
DEBUG: dbrd names U1a565c2,B66e2c91
```
from these results it appears the following parameters are not implemented
* offset
* limit
* owner
other parameters it is uncertain - because of for example algorithm for generating ID or authentication token limitations (org, user), etc.
* sortBy
* org
* id - openapi description states this can be a list of id's but only 1 id seemed to work, comma separated list ('id=0a5dffaa71683000,0a5dffa15fa83000') resulted in HTTP 400
some appear to work as might be expected
* descending
* orgID
__Environment info:__
Testing against K8S-IDPE remocal. Latest commit
```
commit 3c8409e3f2e994280dd8281b403a22718a7b5f56 (HEAD -> master, origin/master, origin/HEAD)
Author: Wojciech Kocjan
Date: Wed Nov 30 08:36:07 2022 +0100
```
Contributor guide
Research direction
Start with the GET definition and parameters in src/common/paths/dashboards.yml, then reproduce the behavior with 20+ dashboards in the K8S-IDPE environment. Check offset, limit, owner, sortBy, id, orgID, and org against the reported results; done means the implemented parameters behave consistently with the OpenAPI document or their unsupported behavior is documented.
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
- 45/100