Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Bundle-size stats: emit Description column (fixes 422 on upload) (#76860)

Romeo Van Snick914130d706e2
diff --git a/.github/scripts/bundle-size-stats-prepare.js b/.github/scripts/bundle-size-stats-prepare.js
index a57adbb5823..9389b156ec9 100644
--- a/.github/scripts/bundle-size-stats-prepare.js
+++ b/.github/scripts/bundle-size-stats-prepare.js
@@ -28,7 +28,7 @@ const deltaPercent = (current, base) =>
* brotliBytes (estimated when no .br shipped), but a cached base point recorded
* before brotli logging may not, so the delta still falls back to gzip per row.
*/
-function buildStatsRows({ measurements, previous, threshold, date, commit, version }) {
+function buildStatsRows({ measurements, previous, threshold, date, commit, commitMessage, version }) {
const previousOf = (bundle, kind) => previous.find(row => row.bundle === bundle && row.kind === kind);
let maxServedDeltaPercent = 0;
@@ -51,6 +51,10 @@ function buildStatsRows({ measurements, previous, threshold, date, commit, versi
"Commit": commit,
"Bundle": measurement.bundle,
"Kind": measurement.kind, // "initial" or "total"
+ // The stats table carries a free-text Description column; append-csv
+ // requires every table column to be present. Populate it with the commit
+ // subject so the chart's points are self-describing.
+ "Description": commitMessage,
"Raw bytes": measurement.rawBytes,
"Gzip bytes": measurement.gzipBytes,
"Brotli bytes": measurement.brotliBytes, // as-served (shipped .br, else estimated)
@@ -126,6 +130,7 @@ function main() {
threshold: Number(env.MIN_DELTA_PERCENT ?? 1),
date: new Date().toISOString().slice(0, 10), // YYYY-MM-DD
commit: (env.HEAD_SHA || "").slice(0, 12),
+ commitMessage: (env.COMMIT_MESSAGE || "").split("\n")[0], // subject line only
version: readVersion(env.VERSION_PROPS),
});
diff --git a/.github/scripts/bundle-size-stats-prepare.unit.spec.js b/.github/scripts/bundle-size-stats-prepare.unit.spec.js
index 2d8a0c44f0c..72162476439 100644
--- a/.github/scripts/bundle-size-stats-prepare.unit.spec.js
+++ b/.github/scripts/bundle-size-stats-prepare.unit.spec.js
@@ -1,6 +1,6 @@
const { buildStatsRows } = require("./bundle-size-stats-prepare");
-const meta = { date: "2026-06-30", commit: "abc123", version: "" };
+const meta = { date: "2026-06-30", commit: "abc123", commitMessage: "Fix the thing (#123)", version: "" };
const measurement = (over = {}) => ({
bundle: "embedding-sdk-chunked",
kind: "total",
@@ -25,6 +25,7 @@ describe("buildStatsRows", () => {
expect(result.reason).toBe("first point");
expect(result.rows[0]["Gzip bytes delta"]).toBe("");
expect(result.rows[0]["Brotli delta %"]).toBe("");
+ expect(result.rows[0]["Description"]).toBe("Fix the thing (#123)");
expect(result.cacheRows[0]).toEqual({
bundle: "embedding-sdk-chunked",
kind: "total",
diff --git a/.github/workflows/bundle-size-stats.yml b/.github/workflows/bundle-size-stats.yml
index 7fd8343e9f4..20fc17a3fec 100644
--- a/.github/workflows/bundle-size-stats.yml
+++ b/.github/workflows/bundle-size-stats.yml
@@ -101,6 +101,9 @@ jobs:
CACHE_OUT: bundle-size-cache/last.json
ROWS_OUT: artifacts/upload-rows.json
VERSION_PROPS: artifacts/version.properties
+ # Passed via env (not interpolated into the shell) so the commit
+ # message can't inject commands; the script keeps only the subject.
+ COMMIT_MESSAGE: ${{ github.event.workflow_run.head_commit.message }}
run: node ./.github/scripts/bundle-size-stats-prepare.js
- name: Upload sizes (with deltas) to Stats
id: upload