Skip to content

Commit

Permalink
logs hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
desmond-hui committed Jun 12, 2024
1 parent 182b6f2 commit fce38d5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions macros/python/udfs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -362,17 +362,8 @@ def get_logs_program_data(logs) -> list:

current_ancestry = [(program,None,parent_event_type)]
elif log.startswith("Call BPF program ") or log.startswith("Upgraded program "): # handle legacy BPF log format
program = log.replace("Call BPF program ","").replace("Upgraded program ","")
parent_index += 1

if i+1 < len(logs) and logs[i+1].startswith("Program log: Instruction: "):
parent_event_type = logs[i+1].replace("Program log: Instruction: ","")
elif i+1 < len(logs) and logs[i+1].startswith("Program log: IX: "):
parent_event_type = logs[i+1].replace("Program log: IX: ","")
else:
parent_event_type = "UNKNOWN"

current_ancestry = [(program,None,parent_event_type)]
# remove legacy log parsing code it is not compatible w/ new
continue
elif bool(pattern.search(log)):
child_index = child_index+1 if child_index is not None else 0
current_program = pattern.sub('', log.replace("Program ","")).strip()
Expand Down

0 comments on commit fce38d5

Please sign in to comment.