Skip to content

Handle indirect changes comparison in net new files #2811

@suejung-sentry

Description

@suejung-sentry

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

Metadata

Metadata

Labels

HighHigh Priority Issues (to be fixed within 2 sprints)bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions