From 849beafeab5fe75289b145f91f695ad4a398b10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 25 Apr 2026 07:53:13 +0200 Subject: [PATCH 1/2] fix: fetch sharded node compat reports After denoland/deno#33298, CI uploads reports as sharded files (report-{os}-{shard_index}.json.gz) instead of a single file per OS. This updates fetchReport to fetch all 3 shards and merge them, with fallback to the old unsharded URL for historical data. --- util/report.ts | 65 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/util/report.ts b/util/report.ts index 627ac7e..2ac9936 100644 --- a/util/report.ts +++ b/util/report.ts @@ -16,8 +16,30 @@ const NOT_FOUND = Symbol("NOT_FOUND"); const reportCache = new WeakValueMap(); const summaryCache = new WeakValueMap(); +const SHARD_COUNT = 3; + +async function fetchSingleReport( + url: string, +): Promise { + try { + const res = await fetch(url); + if (res.status === 404) { + return undefined; + } + const report = await toJson( + res.body!.pipeThrough(new DecompressionStream("gzip")), + ); + return report as TestReport; + } catch (e) { + console.error(e); + return undefined; + } +} + /** * Fetch the report for a specific date and OS. + * Fetches sharded reports and merges them, with fallback to the old + * unsharded format for historical data. * * @param date The date e.g. 2025-04-02 * @param os The os @@ -28,21 +50,42 @@ export async function fetchReport( os: "linux" | "windows" | "darwin", ): Promise { console.log("fetching", date, os); - try { - const res = await fetch( - `https://dl.deno.land/node-compat-test/${date}/report-${os}.json.gz`, + // Fetch all shard reports and merge them + const shardReports: TestReport[] = []; + for (let i = 0; i < SHARD_COUNT; i++) { + const report = await fetchSingleReport( + `https://dl.deno.land/node-compat-test/${date}/report-${os}-${i}.json.gz`, ); - if (res.status === 404) { - return NOT_FOUND; + if (report) { + shardReports.push(report); } - const report = await toJson( - res.body!.pipeThrough(new DecompressionStream("gzip")), + } + // Fall back to unsharded report name for older reports + if (shardReports.length === 0) { + const report = await fetchSingleReport( + `https://dl.deno.land/node-compat-test/${date}/report-${os}.json.gz`, ); - return report as TestReport; - } catch (e) { - console.error(e); - return undefined; + return report ?? NOT_FOUND; + } + if (shardReports.length === 1) { + return shardReports[0]; + } + // Merge shard reports: combine results, recompute counts + const merged = { ...shardReports[0] }; + merged.results = { ...merged.results }; + for (let i = 1; i < shardReports.length; i++) { + const shard = shardReports[i]; + for (const [key, value] of Object.entries(shard.results)) { + merged.results[key] = value; + } } + // Recompute total/pass from merged results. + // Each result is a tuple [pass: bool | "IGNORE", error, info]. + const values = Object.values(merged.results); + merged.total = values.filter((v) => v[0] !== "IGNORE").length; + merged.pass = values.filter((v) => v[0] === true).length; + merged.ignore = values.filter((v) => v[0] === "IGNORE").length; + return merged; } /** Gets the report. Caches the response from the storage. */ From ad26f21272f883b2dba7c4033da77546f971f4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 25 Apr 2026 07:55:28 +0200 Subject: [PATCH 2/2] chore: format SVG files --- static/node-deno.svg | 39 ++++++++++++++++++++++++++------------- static/node.svg | 30 ++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/static/node-deno.svg b/static/node-deno.svg index 205934d..c5fcee5 100644 --- a/static/node-deno.svg +++ b/static/node-deno.svg @@ -22,7 +22,8 @@ cy="127.5" rx="37" ry="10.5" - > + > + + > + + > + + > + + > + + > + + > + + > + + > + + > + + > + @@ -100,7 +111,8 @@ id="Path" fill="#FFFFFF" mask="url(#mask-2)" - > + > + + > + diff --git a/static/node.svg b/static/node.svg index 96c854b..7ec3a13 100644 --- a/static/node.svg +++ b/static/node.svg @@ -19,7 +19,8 @@ cy="227.547695" rx="66" ry="19" - > + > + + > + + > + + > + + > + + > + + > + + > + + > + + > +