codecov / engineering-team

This is a general repo to use with GH Projects
1 stars 1 forks source link

Handle indirect changes comparison in net new files #2811

Open suejung-sentry opened 2 weeks ago

suejung-sentry commented 2 weeks ago

Describe the bug I believe when we try to fetch segments data in the Indirect changes comparison against a file that exists in main but not yet in the branch for the PR, there is an "unknown path" error.

To Reproduce Here are a couple examples - go to the links and try to expand the toggle and see the page resolve to an error page. https://app.codecov.io/github/codecov/codecov-api/pull/945/indirect-changes https://app.codecov.io/github/codecov/gazebo/pull/3457/indirect-changes

The ImpactedFileComparison query to fetch segments shows UnknownPath error. From what I can tell, this appears to happen in the case when the PR needs to get rebased to pick up information about a new file.

Example

To fix, confirm that is what's going on here and have a better comparison for this case (or a better error message)

Additional context

Image Image hangs around with loading spinner for a bit, then resolves to the error page due to the UnknownPath Image Image

eliatcodecov commented 1 day ago

@katia-sentry , based on the discussion above, it feels like @suejung-sentry has the most context. But I'll leave assignment to you since I don't have a sense of difficulty on this ticket nor the upcoming sprint schedule of the team.