Skip to content

Commit

Permalink
Prevent non-ints to make it into the length leaf assoc column
Browse files Browse the repository at this point in the history
Summary:
See task, but it seems that sometimes tools provide bad length values (other than ints and null).

Filter them out

Differential Revision: D63144565

fbshipit-source-id: 58710be5a86194b3a50e0bd2f9959c55966e5ff4
  • Loading branch information
Manuel Fahndrich authored and facebook-github-bot committed Sep 24, 2024
1 parent dd7f650 commit 09ed25a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sapp/pipeline/model_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ def _generate_raw_trace_frame(
leaf_records = []
leaf_mapping_ids: Set[LeafMapping] = set()
for leaf, depth in leaves:
if not isinstance(depth, int) or depth < 0:
depth = None # avoid writing bad stuff to DB
leaf_record = self._get_shared_text(leaf_kind, leaf)
caller_leaf_id = self.graph.get_transform_normalized_caller_kind_id(
leaf_record
Expand Down

0 comments on commit 09ed25a

Please sign in to comment.