Closed nihaals closed 1 year ago
Can you please share a link to the PR?
As it's a private repo, can I provide an ID instead?
Not sure if I can use that to debug, but from seeing this error I believe my understanding of the expected API response might be inaccurate (for https://api.codecov.io/api/v2/{service}/{owner_username}/repos/{repo_name}/compare/
)
I see the docs mention that response.files[i].lines
is a required array of objects, so it's unusual that it's null
for a particular PR.
cc @scott-codecov
Can confirm, one of the files has "lines": null
(and none of the other files). I also can't think of anything in particular that's different about this file.
That is indeed unexpected. @nihaals Would you be willing to share the owner username and repo name of the private repo? The repo ID would be fine as well. I'll go investigate what our API is returning. If you'd prefer to not share that publicly you could email me directly at scott@codecov.io
@scott-codecov I just sent it. If it helps, I can avoid updating the PR for the rest of the day in case that "fixes" the issue.
@nihaals Thanks for the info. I found the issue here - we're truncating some parts of the diff when the number of changed lines exceeds some threshold (as it does in the PR you linked). This was previously used so that UIs could load some of the diff and then incrementally load the rest as needed. I don't think that really applies in the case of the browser extension and since we're already fetching the full diff from GitHub I don't see any reason not to return the whole thing in this case (the response payload may grow in size a bit is all).
Feel free to continue working on your PR. I'll get some changes into our API to resolve this and you can expect the coverage to start showing up once it's deployed sometime in the next couple days. I'll post back here when the change is live.
Thanks for reporting the issue!
@nihaals This should be resolved now. Please try testing again and let me know if you're still experiencing any issues. Thanks!
It looks like it's fixed now, thanks for the quick fix!
Which I assume is: https://github.com/codecov/codecov-browser-extension/blob/c70e406be60a5c2ef0ae81bbee1461fbabda72b7/src/content/github/pr/main.tsx#L144
v0.2.3, both Firefox and Chromium