Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support-logging API do not check record limit #374

Closed
weichou1229 opened this issue Jul 8, 2018 · 5 comments · Fixed by #4203
Closed

support-logging API do not check record limit #374

weichou1229 opened this issue Jul 8, 2018 · 5 comments · Fixed by #4203
Assignees
Labels
bug Something isn't working delhi Delhi release support-services

Comments

@weichou1229
Copy link
Member

weichou1229 commented Jul 8, 2018

According to RAML https://github.com/edgexfoundry/edgex-go/blob/master/support/logging/raml/support-logging.raml#L71 , /api/v1/logs/{{limit}} should check record limit .

eg. the default limit is 100. When the {{limit}} path parameter is 101 and there are more than 101 records in db, the service should return http status 413
However, the current implementation returns 200 ok for this case

@weichou1229 weichou1229 changed the title support-logging API can't check record limit support-logging API do not check record limit Jul 8, 2018
@tsconn23 tsconn23 assigned xmlviking and brandonforster and unassigned xmlviking Jul 8, 2018
@tsconn23
Copy link
Member

Cannot duplicate this issue outside of a test run. Populate the Mongo DB from the logEntryDb.Json file provided in the PR below and then call the endpoint by itself, not as part of a test, and it will work.

edgexfoundry/blackbox-testing#35

@cloudxxx8
Copy link
Member

@cloudxxx8
Copy link
Member

Recreate steps of this issue:

  1. start up support-logging service
  2. add log entry more than 100 records
  3. query log by the API /api/v1/logs/{{limit}}, and assign a value more than 100 to {{limit}}, such as /api/v1/logs/101
  4. see the http status code in the response header

Actual Result:
HTTP Status Code 200 OK

Expected Result:
HTTP Status Code 413 Payload Too Large

@tsconn23 tsconn23 added bug Something isn't working support-services delhi Delhi release labels Jul 18, 2018
@cloudxxx8
Copy link
Member

fixed by #617
@weichou1229 please close this issue

@jduranf
Copy link
Contributor

jduranf commented Oct 8, 2018

Done via #617

@jduranf jduranf closed this as completed Oct 8, 2018
vli11 added a commit to vli11/edgex-go that referenced this issue Oct 19, 2022
closes: edgexfoundry#374
Signed-off-by: Valina Li <valina.li@intel.com>
vli11 added a commit to vli11/edgex-go that referenced this issue Oct 19, 2022
closes: edgexfoundry#374
Signed-off-by: Valina Li <valina.li@intel.com>
vli11 added a commit to vli11/edgex-go that referenced this issue Oct 19, 2022
closes: edgexfoundry#374
Signed-off-by: Valina Li <valina.li@intel.com>
lenny-goodell pushed a commit that referenced this issue Oct 19, 2022
closes: #374
Signed-off-by: Valina Li <valina.li@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working delhi Delhi release support-services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants