feat: Send upload size to upload request and cli version with API requests#702
feat: Send upload size to upload request and cli version with API requests#702calvin-codecov wants to merge 3 commits intomainfrom
Conversation
| mocked_legacy_upload_endpoint.match = [ | ||
| matchers.json_params_matcher(request_data), | ||
| matchers.header_matcher(headers), | ||
| ] | ||
|
|
There was a problem hiding this comment.
This seems like it was incorrectly using the mocked_legacy_upload_endpoint even though this is a different endpoint. I think we want the mocked_test_results_endpoint (newly added below) which would match with the argument at line 295 and with the url designated in this function
| commit_sha, | ||
| report_code, | ||
| upload_coverage, | ||
| file_not_found=file_not_found, |
There was a problem hiding this comment.
This seemed like a missed line from before. We weren't passing in the file_not_found value that is defined higher up at line 59/61 and self.get_url_and_possibly_update_data() takes it in with a default value of "False" so it would always just set `data['file_not_found'] to False
Please review this in particular
thomasrockhu-codecov
left a comment
There was a problem hiding this comment.
Just a note to compare the file sizes
| reports_payload = self._generate_payload( | ||
| upload_data, env_vars, report_type | ||
| ) | ||
| reports_payload_size = len(reports_payload) |
There was a problem hiding this comment.
have you compared this to what comes out of sys.getsizeof?
There was a problem hiding this comment.
I just tried it with example python and there was a slight difference.
len: 2432 bytes
sys.getsizeof: 2469 bytes
Closes https://github.com/codecov/core-engineering/issues/31