Fix a minor bug in CI slack report (#22906)
* fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -57,9 +57,9 @@ def get_last_daily_ci_reports(artifact_names, output_dir, token):
|
|||||||
|
|
||||||
results = {}
|
results = {}
|
||||||
for artifact_name in artifact_names:
|
for artifact_name in artifact_names:
|
||||||
results[artifact_name] = {}
|
|
||||||
artifact_zip_path = os.path.join(output_dir, f"{artifact_name}.zip")
|
artifact_zip_path = os.path.join(output_dir, f"{artifact_name}.zip")
|
||||||
if os.path.isfile(artifact_zip_path):
|
if os.path.isfile(artifact_zip_path):
|
||||||
|
results[artifact_name] = {}
|
||||||
with zipfile.ZipFile(artifact_zip_path) as z:
|
with zipfile.ZipFile(artifact_zip_path) as z:
|
||||||
for filename in z.namelist():
|
for filename in z.namelist():
|
||||||
if not os.path.isdir(filename):
|
if not os.path.isdir(filename):
|
||||||
|
|||||||
@@ -423,8 +423,11 @@ class Message:
|
|||||||
artifact_names=artifact_names, output_dir=output_dir, token=os.environ["ACCESS_REPO_INFO_TOKEN"]
|
artifact_names=artifact_names, output_dir=output_dir, token=os.environ["ACCESS_REPO_INFO_TOKEN"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# The last run doesn't produce `test_failure_tables` (by some issues or have no model failure at all)
|
# if the last run produces artifact named `test_failure_tables`
|
||||||
if len(prev_tables) > 0:
|
if (
|
||||||
|
"test_failure_tables" in prev_tables
|
||||||
|
and "model_failures_report.txt" in prev_tables["test_failure_tables"]
|
||||||
|
):
|
||||||
# Compute the difference of the previous/current (model failure) table
|
# Compute the difference of the previous/current (model failure) table
|
||||||
prev_model_failures = prev_tables["test_failure_tables"]["model_failures_report.txt"]
|
prev_model_failures = prev_tables["test_failure_tables"]["model_failures_report.txt"]
|
||||||
entries_changed = self.compute_diff_for_failure_reports(model_failures_report, prev_model_failures)
|
entries_changed = self.compute_diff_for_failure_reports(model_failures_report, prev_model_failures)
|
||||||
|
|||||||
Reference in New Issue
Block a user