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

Upload report to Schemathesis failed due to huge payload #1518

Closed
tl-madhulika-mitra opened this issue May 28, 2022 · 3 comments · Fixed by #1519
Closed

Upload report to Schemathesis failed due to huge payload #1518

tl-madhulika-mitra opened this issue May 28, 2022 · 3 comments · Fixed by #1519
Assignees
Labels
Status: Needs Triage Requires initial assessment to categorize and prioritize Type: Bug Errors or unexpected behavior

Comments

@tl-madhulika-mitra
Copy link

Describe the bug
Payload reached size limit. Report upload failed

To Reproduce
Steps to reproduce the behavior:

  1. Run this command st run pet-swagger --base-url=https://petstore3.swagger.io/api/v3/ --checks=all
  2. See error

Schemathesis.io responded with HTTP 413
An error happened during uploading reports to Schemathesis.io:
Please, consider reporting the traceback below it to our issue tracker: https://github.com/schemathesis/schemathesis/issues/new?labels=Status%3A+Review+Needed%2C+Type%3A+Bug&template=bug_report.md&title=%5BBUG%5D
Response: Payload reached size limit.
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/schemathesis/service/worker.py", line 13, in start
consume_events(client, in_queue, test_run.run_id)
File "/opt/homebrew/lib/python3.9/site-packages/schemathesis/service/worker.py", line 33, in consume_events
client.send_event(run_id, data)
File "/opt/homebrew/lib/python3.9/site-packages/schemathesis/service/client.py", line 56, in send_event
self.post(f"/runs/{run_id}/events/", json=data)
File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 577, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/schemathesis/service/client.py", line 34, in request
return super().request(method, url, *args, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/requests/sessions.py", line 652, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/schemathesis/service/client.py", line 24, in
self.hooks["response"] = [lambda response, *args, **kwargs: response.raise_for_status()] # type: ignore
File "/opt/homebrew/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 413 Client Error: Payload Too Large for url: https://api.schemathesis.io/runs/3afaa05c-3e41-4104-889e-59f296311bc1/events/

If possible, please post a minimal version of your API schema that cause this behavior:

Was trying to test with - https://petstore3.swagger.io/api/v3/openapi.json

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • OS: [Mac M1]
  • Python version: [e.g. 3.9]
  • Schemathesis- 3.15.2
  • Open API pec - 3
@tl-madhulika-mitra tl-madhulika-mitra added Status: Needs Triage Requires initial assessment to categorize and prioritize Type: Bug Errors or unexpected behavior labels May 28, 2022
@Stranger6667
Copy link
Member

Thanks! I should have thought about this :( I am reworking uploads now at #1516 and will take this into account

@Stranger6667
Copy link
Member

That's an oversight on how failures are deduplicated. Will fix it during the next hour

@Stranger6667
Copy link
Member

The fix is released in 3.15.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Requires initial assessment to categorize and prioritize Type: Bug Errors or unexpected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants