Skip to content

Commit 9f95df1

Browse files
committed
Fix test_report in dask/dask
1 parent f4cfecc commit 9f95df1

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

continuous_integration/scripts/test_report.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import re
99
import shelve
1010
import sys
11+
import warnings
1112
import zipfile
1213
from collections.abc import Iterable, Iterator
1314
from concurrent.futures import ProcessPoolExecutor
@@ -379,24 +380,27 @@ def download_and_parse_artifacts(
379380
continue
380381
df = dataframe_from_jxml(cast(Iterable, xml))
381382

382-
# Needed until *-*-mindeps-numpy shows up in TEST_ID
383-
a["name"] = a["name"].replace("--", "-numpy-")
384-
385-
# TODO: Some artifacts created w/ wrong name in dask
386-
# This can be removed after ~90 days.
387-
# Between time https://github.com/dask/dask/pull/10769 was merged and
388-
# then https://github.com/dask/dask/pull/10781 which changed the name
389-
if a["name"].startswith("test-results") and repo.endswith("/dask"):
390-
continue
391-
392383
# Note: we assign a column with the workflow run timestamp rather
393384
# than the artifact timestamp so that artifacts triggered under
394385
# the same workflow run can be aligned according to the same trigger
395386
# time.
396-
html_url = jobs_df[jobs_df["suite_name"] == a["name"]].html_url.unique()
397-
assert (
398-
len(html_url) == 1
399-
), f"Artifact suite name {a['name']} did not match any jobs dataframe:\n{jobs_df['suite_name'].unique()}"
387+
a_match = jobs_df["suite_name"] == a["name"]
388+
a_name_msg = a["name"]
389+
if a["name"].endswith("-"):
390+
# dask/dask array expressions enabled
391+
a_match |= jobs_df["suite_name"] == f"{a['name']}false"
392+
a_name_msg += f" or {a['name']}false"
393+
html_url = jobs_df[a_match].html_url.unique()
394+
if len(html_url) != 1:
395+
warnings.warn(
396+
f"Artifact suite name {a_name_msg} "
397+
"did not match any jobs in the dataframe:\n"
398+
f"{jobs_df['suite_name'].unique()}; skipping...",
399+
RuntimeWarning,
400+
stacklevel=2,
401+
)
402+
continue
403+
400404
html_url = html_url[0]
401405
assert html_url is not None
402406
df2 = df.assign(

0 commit comments

Comments
 (0)