1616
1717def write_summary (output_file , summary_data ):
1818 """
19- Writes summary to output file and creates any directories in the output_file's path
19+ Writes summary to output file and creates any directories in the output_file's path
2020 that already don't exist
2121 """
2222
@@ -46,24 +46,17 @@ def read_log(input_file):
4646
4747 Returns a dictionary with "errors" and "info" as the keys to lists of log
4848 file output to include in the summary
49-
50- NOTE: GRT-0119 is skipped for right now
5149 """
52-
50+
5351 summary_data = { "errors" : [], "info" : [] }
5452 orfs_regex_error = re .compile (r"^\[error ?(\w+-\d+)?\]" , re .IGNORECASE )
5553 bazel_regex_error = re .compile (r"^error:" , re .IGNORECASE )
5654 regex_hitrate = re .compile (r"^INFO\:\s+\d+\s+processes\:\s+\d+\s+remote\s+cache\s+hit" )
57-
55+
5856 with open (input_file , "r" ) as in_fh :
5957 for line in in_fh :
60- orfs_result = orfs_regex_error .match (line )
61- if orfs_result :
62- orfs_error_code = orfs_result .group (1 )
63- print (orfs_error_code )
64- # skip "Routing congestion too high" error for now
65- if orfs_error_code != "GRT-0119" :
66- summary_data ["errors" ].append (line .strip ())
58+ if orfs_regex_error .match (line ):
59+ summary_data ["errors" ].append (line .strip ())
6760 elif re .search (bazel_regex_error , line ):
6861 summary_data ["errors" ].append (line .strip ())
6962 elif line .startswith ("INFO: Elapsed time" ) or re .search (regex_hitrate , line ) or line .startswith ("INFO: Build completed successfully" ):
@@ -79,8 +72,3 @@ def read_log(input_file):
7972
8073summary_data = read_log (args .input_file )
8174write_summary (args .output_file , summary_data )
82- sys .exit (len (summary_data ["errors" ]) > 0 )
83-
84-
85-
86-
0 commit comments