Skip to content

Commit

Permalink
Stop creating issues if the instance is trimmed
Browse files Browse the repository at this point in the history
Summary:
While working on D61398769, I saw that we are sometimes creating issues without a corresponding issue instance in cases where the instance is trimmed from the graph.

This diff fixes that by making sure to remove the associated issue when an issue instance is trimmed.

Reviewed By: yuhshin-oss

Differential Revision: D61410591

fbshipit-source-id: 17e1170d5f7c67d6622b8929bdd8c4def8fabf9a
  • Loading branch information
alexblanck authored and facebook-github-bot committed Aug 19, 2024
1 parent 0336512 commit 97cc166
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sapp/trimmed_trace_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def _remove_instance(self, instance: IssueInstance) -> None:
associations too"""
instance_id = instance.id.local_id
self._issue_instances.pop(instance_id, None)
self._issues.pop(instance.issue_id.local_id, None)
for initial_frame_id in self._issue_instance_trace_frame_assoc[instance_id]:
# initial frames are only associated with one issue
self._trace_frame_issue_instance_assoc.pop(initial_frame_id, None)
Expand Down

0 comments on commit 97cc166

Please sign in to comment.