From 1267152b567878cfac0f7af9bb2f11e3025f7970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Fri, 12 May 2023 16:23:23 +0200 Subject: [PATCH] [tools] Second take to fix bloat check (#26544) Apparently, in the previous PR I replaced the deprecated DataFrame.append with pandas.concat, but I didn't realize that our scripts add extra attributes to the data frame, which are not copied during the concatenation. This time, I verified the script locally using --github-comment and --github-dryrun-comment. Also, do not fetch submodules in the bloat check job as it takes most of the job's execution time. --- .github/workflows/bloat_check.yaml | 1 - scripts/tools/memory/gh_report.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 99d279c20970c6..01f041cdd0a506 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -41,7 +41,6 @@ jobs: with: action: actions/checkout@v3 with: | - submodules: true token: ${{ github.token }} attempt_limit: 3 attempt_delay: 2000 diff --git a/scripts/tools/memory/gh_report.py b/scripts/tools/memory/gh_report.py index c35c3e53840be4..ddaa23a45e79ba 100755 --- a/scripts/tools/memory/gh_report.py +++ b/scripts/tools/memory/gh_report.py @@ -375,8 +375,10 @@ def merge(df: pd.DataFrame, comment) -> pd.DataFrame: cols, rows = memdf.util.markdown.read_hierified(body) break logging.debug('REC: read %d rows', len(rows)) + attrs = df.attrs df = pd.concat([df, pd.DataFrame(data=rows, columns=cols).astype(df.dtypes)], ignore_index=True) + df.attrs = attrs return df.sort_values( by=['platform', 'target', 'config', 'section']).drop_duplicates()