Skip to content

Commit

Permalink
[Size reports] Fix transient failure (#14545)
Browse files Browse the repository at this point in the history
#### Problem

The workflow to produce size report comments on PRs adds new
data to existing comments as CI runs complete. This fails when
(a) there is an existing partial comment for a PR commit, and
(b) there are new build artifacts for the commit and/or master, but
(c) none of the new artifact pairs are for the same specific builds.
In this case there is no new data to add, which leads to an internal
table column having the wrong dynamic data type, which causes a
python exception.

#### Change overview

Don't try to create or amend a GitHub comment when there is no new data.

#### Testing

Locally exercised using current build artifacts.
  • Loading branch information
kpschoedel authored Jan 29, 2022
1 parent eb628d3 commit 4e1a999
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/tools/memory/gh_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,9 @@ def report_matching_commits(db: SizeDatabase) -> Dict[str, pd.DataFrame]:
continue

df = changes_for_commit(db, pr, commit, parent)
if df.empty:
# Matching commits had no new matching builds.
continue
dfs[df.attrs['name']] = df

if (event == 'pull_request' and comment_enabled
Expand Down

0 comments on commit 4e1a999

Please sign in to comment.