@@ -86,9 +86,7 @@ def _build_changepoint_preview(json_data, test_label):
8686 lines .append (f"\n [{ test_label } ]" )
8787
8888 github_ctx = entry .get ("github_context" ) or {}
89- version = github_ctx .get (
90- "current_version" , entry .get ("ocpVersion" , "unknown" )
91- )
89+ version = github_ctx .get ("current_version" , entry .get ("ocpVersion" , "unknown" ))
9290 prs = entry .get ("prs" , [])
9391 lines .append (f" { ', ' .join (regressed )} " )
9492 lines .append (f" Changepoint at: { version } " )
@@ -138,9 +136,11 @@ def scan_orion_jsons(directory_path):
138136
139137 # Per-step subdirectories: each subdir name matches the viz URL key
140138 # (both derived from strip_step_prefixes on the GCS folder name).
141- step_subdirs = sorted (
142- [d for d in base_dir .iterdir () if d .is_dir ()]
143- ) if base_dir .exists () else []
139+ step_subdirs = (
140+ sorted ([d for d in base_dir .iterdir () if d .is_dir ()])
141+ if base_dir .exists ()
142+ else []
143+ )
144144
145145 if step_subdirs :
146146 json_pairs = [
@@ -153,7 +153,9 @@ def scan_orion_jsons(directory_path):
153153 json_files = list (base_dir .glob ("*.json" )) if base_dir .exists () else []
154154 if not json_files :
155155 root = Path (directory_path )
156- json_files = list (root .glob ("junit_*.json" )) or list (root .glob ("output_*.json" ))
156+ json_files = list (root .glob ("junit_*.json" )) or list (
157+ root .glob ("output_*.json" )
158+ )
157159 json_pairs = [(strip_step_prefixes (f .stem ), f ) for f in json_files ]
158160
159161 preview_results , changepoint_tests = _collect_changepoints (json_pairs )
@@ -260,18 +262,6 @@ def analyze_prow_artifacts(directory_path, job_name):
260262 ),
261263 None ,
262264 )
263- if matched_line is None :
264- matched_line = (
265- "Couldn't identify the failure step, likely a maintanence issue"
266- )
267- return ProwAnalysisResult (
268- errors = [matched_line ],
269- categorization_message = MAINTENANCE_ISSUE ,
270- requires_llm = False ,
271- is_install_issue = True ,
272- step_name = None ,
273- full_errors_for_file = None ,
274- )
275265 junit_operator_file_path = os .path .join (directory_path , "junit_operator.xml" )
276266 # Defaults in case XML parsing yields no values
277267 step_phase , step_name , step_summary = None , None , ""
@@ -293,10 +283,35 @@ def analyze_prow_artifacts(directory_path, job_name):
293283 step_name , step_phase , job_name
294284 )
295285 else :
296- categorization_message = categorize_prow_failure (
297- matched_line , "unknown" , job_name
298- )
286+ if matched_line is not None :
287+ categorization_message = categorize_prow_failure (
288+ matched_line , "unknown" , job_name
289+ )
290+ else :
291+ categorization_message = MAINTENANCE_ISSUE
299292 step_summary = ""
293+ if matched_line is None :
294+ if step_name and step_phase :
295+ return ProwAnalysisResult (
296+ errors = [step_summary ] if step_summary else [],
297+ categorization_message = (
298+ f"Maintenance Issue: { step_name } failed in" f" { step_phase } phase"
299+ ),
300+ requires_llm = False ,
301+ is_install_issue = True ,
302+ step_name = step_name ,
303+ full_errors_for_file = None ,
304+ )
305+ return ProwAnalysisResult (
306+ errors = [
307+ "Couldn't identify the failure step," " likely a maintenance issue"
308+ ],
309+ categorization_message = MAINTENANCE_ISSUE ,
310+ requires_llm = False ,
311+ is_install_issue = True ,
312+ step_name = None ,
313+ full_errors_for_file = None ,
314+ )
300315 cluster_operators_file_path = os .path .join (directory_path , "clusteroperators.json" )
301316 if not os .path .isfile (cluster_operators_file_path ):
302317 with open (build_file_path , "r" , errors = "replace" , encoding = "utf-8" ) as f :
0 commit comments