Skip to content

Commit 9adcfd6

Browse files
committed
fix(ci): address review comments for CI log system
1 parent 845886b commit 9adcfd6

2 files changed

Lines changed: 38 additions & 11 deletions

File tree

dashboard/pages/ci_history.py

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,19 @@ def create_history_dataframe(ci_history: list) -> pd.DataFrame:
190190
run_id_display = ", ".join(run_ids) if run_ids else "unknown"
191191

192192
# Extract failed test details
193-
failed_details = []
194-
for result in results:
195-
if result.get("result_code", 0) != 0:
196-
failed_details.append(
197-
{
198-
"testcase": result.get("testcase", "unknown"),
199-
"run_id": result.get("run_id", "unknown"),
200-
"result_code": result.get("result_code", -1),
201-
"result_file": result.get("result_file", ""),
202-
}
203-
)
193+
failed_details = item.get("failed_tests_details") or []
194+
if not failed_details:
195+
for result in results:
196+
if result.get("result_code", 0) != 0:
197+
failed_details.append(
198+
{
199+
"testcase": result.get("testcase", "unknown"),
200+
"run_id": result.get("run_id", "unknown"),
201+
"result_code": result.get("result_code", -1),
202+
"result_file": result.get("result_file", ""),
203+
"error_msg": result.get("error_msg", "Unknown error"),
204+
}
205+
)
204206

205207
rows.append(
206208
{
@@ -477,6 +479,11 @@ def render_failure_details(df):
477479
st.markdown(f"**{i+1}. {fail.get('testcase', 'unknown')}**")
478480
st.markdown(f"- Run ID: `{fail.get('run_id', 'unknown')}`")
479481
st.markdown(f"- Result Code: {fail.get('result_code', -1)}")
482+
483+
error_msg = fail.get("error_msg")
484+
if error_msg and error_msg != "Unknown error":
485+
st.markdown(f"- 错误信息: `{error_msg}`")
486+
480487
if fail.get("result_file"):
481488
st.markdown(f"- Result File: `{fail.get('result_file')}`")
482489
st.divider()

infinimetrics/executor.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class TestResult:
3939
skipped: bool = False
4040
config: Optional[Dict[str, Any]] = None
4141
duration: float = 0.0
42+
error_msg: Optional[str] = None
4243

4344
def to_dict(self) -> Dict[str, Any]:
4445
"""Convert to lightweight dictionary format for Dispatcher aggregation."""
@@ -50,6 +51,7 @@ def to_dict(self) -> Dict[str, Any]:
5051
"skipped": self.skipped,
5152
"config": self.config,
5253
"duration": self.duration,
54+
"error_msg": self.error_msg,
5355
}
5456

5557

@@ -156,6 +158,7 @@ def execute(self) -> TestResult:
156158
result_file=None,
157159
config=config,
158160
duration=0.0,
161+
error_msg=None,
159162
)
160163

161164
response = {}
@@ -215,6 +218,9 @@ def _handle_error(
215218
test_result.duration = duration
216219
error_msg = str(error)
217220

221+
# Set error message
222+
test_result.error_msg = error_msg
223+
218224
# Determine error type and result code
219225
if isinstance(error, subprocess.TimeoutExpired):
220226
test_result.result_code = ErrorCode.TIMEOUT
@@ -317,6 +323,20 @@ def _extract_device_info(self, config: Dict[str, Any]) -> Dict[str, Any]:
317323
"device_used": device_used,
318324
}
319325

326+
def _collect_static_hw(self, accel_type="", device_ids=None):
327+
"""
328+
Collect static hardware information.
329+
"""
330+
return {
331+
"cpu_model": "Unknown",
332+
"memory_gb": 0,
333+
"gpu_model": "Unknown",
334+
"gpu_memory_gb": 0,
335+
"driver_version": "Unknown",
336+
"cuda_version": "Unknown",
337+
"accelerator_type": accel_type or "generic",
338+
}
339+
320340
def _build_environment(self, response: Dict[str, Any]) -> Dict[str, Any]:
321341
"""
322342
Build a unified environment block

0 commit comments

Comments
 (0)