mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
build(chrome): pin chrome-headless-shell 158.0.8127.36 wherever the repo installs it (#8145)
The engine ceiling moves from Beta 152.0.7977.30 to stable 158.0.8127.36, with its Chrome for Testing digests. The places that installed `@stable` or an older pin follow it: the CI test workspace, the regression test image, the k8s and Cloud Run examples, the CLI render image (amd64) and the Lambda build hint. The motion-blur nightly keeps its pinned-versus-stable comparison: the pin leg now uses the workspace's pinned shell, and a stable leg fetches stable. The chat regression golden is regenerated on 158. Chrome 157 renders it pixel-identically to 158, so the previous golden recorded Chrome 152's paint of a background-clip:text phrase whose word spans start at opacity 0. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d574ded1ec
commit
7930525024
@@ -38,7 +38,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
dir="$RUNNER_TEMP/headless-shell"
|
||||
bunx @puppeteer/browsers@3.2.2 install chrome-headless-shell@stable --path "$dir"
|
||||
bunx @puppeteer/browsers@3.2.2 install chrome-headless-shell@158.0.8127.36 --path "$dir"
|
||||
echo "path=$(find "$dir" -type f -name chrome-headless-shell | head -n 1)" >> "$GITHUB_OUTPUT"
|
||||
- shell: bash
|
||||
run: bun run --filter '@hyperframes/{parsers,lint,studio-server}' build
|
||||
|
||||
@@ -61,17 +61,18 @@ jobs:
|
||||
with:
|
||||
engine: "true"
|
||||
headless-shell: "true"
|
||||
- id: pin
|
||||
if: matrix.flavour == 'pin'
|
||||
# The workspace action installs the pinned shell; the stable leg fetches the current stable one.
|
||||
- id: stable
|
||||
if: matrix.flavour == 'stable'
|
||||
shell: bash
|
||||
run: |
|
||||
dir="$RUNNER_TEMP/headless-shell-pin"
|
||||
bunx @puppeteer/browsers@3.2.2 install chrome-headless-shell@153.0.8010.36 --path "$dir"
|
||||
dir="$RUNNER_TEMP/headless-shell-stable"
|
||||
bunx @puppeteer/browsers@3.2.2 install chrome-headless-shell@stable --path "$dir"
|
||||
echo "path=$(find "$dir" -type f -name chrome-headless-shell | head -n 1)" >> "$GITHUB_OUTPUT"
|
||||
- name: Run the generated compositions
|
||||
working-directory: packages/engine
|
||||
env:
|
||||
HYPERFRAMES_BROWSER_PATH: ${{ matrix.flavour == 'pin' && steps.pin.outputs.path || steps.workspace.outputs.headless-shell-path }}
|
||||
HYPERFRAMES_BROWSER_PATH: ${{ matrix.flavour == 'stable' && steps.stable.outputs.path || steps.workspace.outputs.headless-shell-path }}
|
||||
HF_BLUR_SEEDS: ${{ matrix.chunk.seeds }}
|
||||
HF_BLUR_FAILURES_FILE: ${{ github.workspace }}/blur-nightly-failures.json
|
||||
HF_BLUR_REQUIRED: "1"
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ ENV CONTAINER=true
|
||||
# baselines in packages/producer/tests/*/output/output.mp4 stay reproducible.
|
||||
# Each Chrome stable bump shifts pixel output enough to fail PSNR. Bump this
|
||||
# version together with regenerating baselines via `docker:test:update`.
|
||||
RUN npx --yes @puppeteer/browsers install chrome-headless-shell@152.0.7977.30 \
|
||||
RUN npx --yes @puppeteer/browsers install chrome-headless-shell@158.0.8127.36 \
|
||||
--path /root/.cache/puppeteer \
|
||||
&& find /root/.cache/puppeteer/chrome-headless-shell -name "chrome-headless-shell" -type f \
|
||||
&& echo "chrome-headless-shell installed"
|
||||
|
||||
@@ -31,7 +31,7 @@ The CLI can build the renderer automatically when it runs from a HyperFrames
|
||||
repository checkout. Outside the repository, pass an image built from
|
||||
`packages/gcp-cloud-run/Dockerfile` with `--image`.
|
||||
|
||||
The renderer image uses Chrome 152, matching the CLI's managed browser, so
|
||||
The renderer image uses Chrome 158, matching the CLI's managed browser, so
|
||||
gradient text inside transformed child elements also renders in Cloud Run.
|
||||
Existing deployments need a rebuilt image and a new deployment to receive
|
||||
the browser update.
|
||||
|
||||
@@ -109,7 +109,7 @@ RUN case "$TARGETARCH" in \
|
||||
# ── Chrome ───────────────────────────────────────────────────────────────────
|
||||
# Use `@puppeteer/browsers` to fetch the chrome-headless-shell version
|
||||
# packages/gcp-cloud-run/Dockerfile pins.
|
||||
ENV CHROME_HEADLESS_SHELL_VERSION=152.0.7977.30
|
||||
ENV CHROME_HEADLESS_SHELL_VERSION=158.0.8127.36
|
||||
ENV CHROME_DIR=/opt/chrome
|
||||
|
||||
RUN mkdir -p "$CHROME_DIR" && \
|
||||
|
||||
@@ -404,7 +404,7 @@ function stageChromeHeadlessShell(stagingDir: string): void {
|
||||
if (!existsSync(baseDir)) {
|
||||
throw new Error(
|
||||
`[build-zip] chrome-headless-shell cache missing at ${baseDir}. Run\n` +
|
||||
` npx --yes @puppeteer/browsers install chrome-headless-shell@stable --path ${home}/.cache/puppeteer\n` +
|
||||
` npx --yes @puppeteer/browsers install chrome-headless-shell@158.0.8127.36 --path ${home}/.cache/puppeteer\n` +
|
||||
`before --source=chrome-headless-shell.`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Prints PINNED_SHELL_DIGESTS for packages/engine/src/services/chromeHostCeiling.ts: each pinned build's headless
|
||||
// shell, downloaded from Chrome for Testing with the installer the CLI uses, digested as the CLI checks it.
|
||||
//
|
||||
// bun run --cwd packages/cli pin:chrome 152.0.7977.30 150.0.7871.124
|
||||
// bun run --cwd packages/cli pin:chrome 158.0.8127.36 150.0.7871.124
|
||||
|
||||
import { mkdtempSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
|
||||
@@ -2007,7 +2007,7 @@ describe("browser resolution on macOS 12 (Darwin < 22)", () => {
|
||||
|
||||
it.each([
|
||||
{ host: MAC_12, expected: OLD_BUILD },
|
||||
{ host: MAC_13, expected: "152.0.7977.30" },
|
||||
{ host: MAC_13, expected: "158.0.8127.36" },
|
||||
])("downloads $expected on $host.release", async ({ host, expected }) => {
|
||||
installFsMocks({ existing: new Set(), osHost: host });
|
||||
const install = vi.fn(async () => ({ executablePath: MAC_HF_BINARY }));
|
||||
@@ -2033,7 +2033,7 @@ describe("browser resolution on macOS 12 (Darwin < 22)", () => {
|
||||
{
|
||||
browser: "chrome-headless-shell",
|
||||
executablePath: MAC_HF_BINARY,
|
||||
buildId: "152.0.7977.30",
|
||||
buildId: "158.0.8127.36",
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -2069,10 +2069,10 @@ describe("browser resolution on macOS 12 (Darwin < 22)", () => {
|
||||
installFsMocks({
|
||||
existing: new Set([
|
||||
PUPPETEER_CACHE,
|
||||
macPuppeteerBinary("mac-152.0.7977.30"),
|
||||
macPuppeteerBinary("mac-158.0.8127.36"),
|
||||
macPuppeteerBinary("mac-150.0.7871.124"),
|
||||
]),
|
||||
dirs: { [PUPPETEER_CACHE]: ["mac-152.0.7977.30", "mac-150.0.7871.124"] },
|
||||
dirs: { [PUPPETEER_CACHE]: ["mac-158.0.8127.36", "mac-150.0.7871.124"] },
|
||||
osHost: MAC_12,
|
||||
});
|
||||
installPuppeteerBrowsersMock({ browserPlatform: "mac" });
|
||||
@@ -2088,17 +2088,17 @@ describe("browser resolution on macOS 12 (Darwin < 22)", () => {
|
||||
installFsMocks({
|
||||
existing: new Set([
|
||||
PUPPETEER_CACHE,
|
||||
macPuppeteerBinary("mac-152.0.7977.30"),
|
||||
macPuppeteerBinary("mac-158.0.8127.36"),
|
||||
macPuppeteerBinary("mac-150.0.7871.124"),
|
||||
]),
|
||||
dirs: { [PUPPETEER_CACHE]: ["mac-152.0.7977.30", "mac-150.0.7871.124"] },
|
||||
dirs: { [PUPPETEER_CACHE]: ["mac-158.0.8127.36", "mac-150.0.7871.124"] },
|
||||
osHost: MAC_13,
|
||||
});
|
||||
installPuppeteerBrowsersMock({ browserPlatform: "mac" });
|
||||
const { findBrowser } = await import("./manager.js");
|
||||
|
||||
await expect(findBrowser()).resolves.toEqual({
|
||||
executablePath: macPuppeteerBinary("mac-152.0.7977.30"),
|
||||
executablePath: macPuppeteerBinary("mac-158.0.8127.36"),
|
||||
source: "cache",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -425,7 +425,7 @@ function warnSystemFallbackOnce(executablePath: string): void {
|
||||
if (isHeadlessShellBinary(executablePath)) return;
|
||||
_warnedSystemFallback = true;
|
||||
console.warn(
|
||||
`[hyperframes] Using system Chrome at ${executablePath}; HeadlessExperimental.beginFrame is unavailable in regular Chrome builds, so the perf-optimized capture path falls back to screenshot mode. Install chrome-headless-shell for the optimized path:\n npx @puppeteer/browsers install chrome-headless-shell\n(Or set HYPERFRAMES_BROWSER_PATH to point at an existing chrome-headless-shell binary.)`,
|
||||
`[hyperframes] Using system Chrome at ${executablePath}; HeadlessExperimental.beginFrame is unavailable in regular Chrome builds, so the perf-optimized capture path falls back to screenshot mode. Install chrome-headless-shell for the optimized path:\n npx @puppeteer/browsers install chrome-headless-shell@${managedChromeVersion()}\n(Or set HYPERFRAMES_BROWSER_PATH to point at an existing chrome-headless-shell binary.)`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ ENV CONTAINER=true
|
||||
# The wrapper script below wires whichever binary landed into
|
||||
# PRODUCER_HEADLESS_SHELL_PATH, or fails the build loudly if neither did.
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
npx --yes @puppeteer/browsers install chrome-headless-shell@stable \
|
||||
npx --yes @puppeteer/browsers install chrome-headless-shell@158.0.8127.36 \
|
||||
--path /root/.cache/puppeteer; \
|
||||
else \
|
||||
npx --yes playwright-core@${PLAYWRIGHT_VERSION} install chromium-headless-shell; \
|
||||
|
||||
@@ -1254,7 +1254,7 @@ const RESOLVE_HEADLESS_SHELL_SUBPROCESS_SCRIPT = `
|
||||
for (const name of list(join(root, version))) {
|
||||
const folder = join(root, version, name);
|
||||
if (!["chrome-headless-shell", "chrome-headless-shell.exe"].some((shell) => isShell(join(folder, shell)))) continue;
|
||||
try { PINNED_SHELL_DIGESTS["152.0.7977.30"].push(headlessShellDigest(folder)); } catch {}
|
||||
try { PINNED_SHELL_DIGESTS["158.0.8127.36"].push(headlessShellDigest(folder)); } catch {}
|
||||
}
|
||||
});
|
||||
trust.then(() => import(process.env.HF_TEST_MODULE_URL)).then(({ resolveHeadlessShellPath }) => {
|
||||
@@ -1573,7 +1573,7 @@ describe("resolveHeadlessShellPath", () => {
|
||||
".cache",
|
||||
...cache,
|
||||
"chrome-headless-shell",
|
||||
"linux-152.0.7977.30",
|
||||
"linux-158.0.8127.36",
|
||||
);
|
||||
mkdirSync(join(folder, "chrome-headless-shell-linux64"), { recursive: true });
|
||||
writeFileSync(
|
||||
@@ -1645,7 +1645,7 @@ describe("resolveHeadlessShellPath", () => {
|
||||
);
|
||||
mkdirSync(shell("153.0.7990.1"), { recursive: true });
|
||||
for (const [version, content] of [
|
||||
["152.0.7977.30", ""],
|
||||
["158.0.8127.36", ""],
|
||||
["150.0.7871.124", "shell"],
|
||||
]) {
|
||||
mkdirSync(join(shell(version), ".."), { recursive: true });
|
||||
|
||||
@@ -30,9 +30,9 @@ export function exceedsChromeCeiling(versionName: string, ceiling: number | unde
|
||||
return major > ceiling;
|
||||
}
|
||||
|
||||
// Deliberately Beta, not Canary: 153.0.8000.0 measured identical to this build on every probe. macOS 12 gets 150,
|
||||
// the last headless shell that launches there; it exposes canvas.drawElementImage under CanvasDrawElement.
|
||||
const CHROME_VERSION = "152.0.7977.30";
|
||||
// Chrome Stable, so the managed shell keeps receiving stable security fixes. macOS 12 gets 150, the last headless
|
||||
// shell that launches there; it exposes canvas.drawElementImage under CanvasDrawElement.
|
||||
const CHROME_VERSION = "158.0.8127.36";
|
||||
const MACOS_12_CHROME_VERSION = "150.0.7871.124";
|
||||
|
||||
export function managedChromeVersion(
|
||||
@@ -47,12 +47,12 @@ export function managedChromeVersion(
|
||||
/** Each pinned build's headless shell folder (Chrome for Testing), by `headlessShellDigest`, one per platform.
|
||||
* Regenerate with `bun run --cwd packages/cli pin:chrome <builds>` whenever a version above moves. */
|
||||
export const PINNED_SHELL_DIGESTS: Readonly<Record<string, readonly string[]>> = {
|
||||
"152.0.7977.30": [
|
||||
"36d776bdf60c0905d45fbd0ab22e110212a9fc1ecbfe2ab9635f2e189f063cee",
|
||||
"b73346545b700f0971b40523b1de11568098738453af4fca4d7e89ef81345b82",
|
||||
"f657ca808c956e3ec04d8be73b72a1205d8b6ec9778eee2b6117f30974da0164",
|
||||
"799dccb1f0f0042632c9959477a8e65a1673570b09855ffdc5609d1a8644cbf6",
|
||||
"d9abf42d234878c1320053caecccf1863dd27daf9d67c828686672dcd3748287",
|
||||
"158.0.8127.36": [
|
||||
"564ba9876826b3a3ce71f862a37c85ee7938191975afad9f427918db6b073e13",
|
||||
"32499804ce68213b7a3d5f622c8c94004522b02ed35bab7913495e6c8986c904",
|
||||
"2ba780aa9f4afc4f79f4d6c1b32eb0fb9c0217faaa88ac56b5c82facfb31742d",
|
||||
"ca7a3db192eb40cf690d8c338e5e15b62ebaaee4b02e0996521e22f6081c6db3",
|
||||
"dee5819f7bd47d82915bc0598a80288b7f09b9b3f819eef4008fdc208dc6f345",
|
||||
],
|
||||
"150.0.7871.124": [
|
||||
"8c1c8a8f68f53b66b2ca340bcf0d6b3f50f9961b3042b759cefdecc7d2eacd4b",
|
||||
|
||||
@@ -82,8 +82,8 @@ RUN case "$TARGETARCH" in \
|
||||
# HeadlessExperimental.beginFrame before the image can build. Chrome for Testing
|
||||
# publishes no linux arm64 headless shell and no checksums, so the sha256 below
|
||||
# was taken from the archive itself; bump the version and hash together.
|
||||
ARG CHROME_HEADLESS_SHELL_VERSION=152.0.7977.30
|
||||
ARG CHROME_HEADLESS_SHELL_SHA256_AMD64=1b150320178ecabe39726bcf3198ebb896ba2b7a07d870db1710914c42d55221
|
||||
ARG CHROME_HEADLESS_SHELL_VERSION=158.0.8127.36
|
||||
ARG CHROME_HEADLESS_SHELL_SHA256_AMD64=2d3a23017323c54fd457a678e4351f895c4076d8050e39d5aa6247f93448b73a
|
||||
RUN case "$TARGETARCH" in \
|
||||
amd64) CHS_SHA256="$CHROME_HEADLESS_SHELL_SHA256_AMD64" ;; \
|
||||
*) echo "no pinned chrome-headless-shell for TARGETARCH '$TARGETARCH'" >&2; exit 1 ;; \
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:46e92d822f05287d87572ddc50230dba2f10c047a4f8f0c5fd3ad26a7df01170
|
||||
size 2150310
|
||||
oid sha256:198c14047aa6e0d1f8bc355d8d0a4ee7352502ca6dff39e2882fc49b676edd2d
|
||||
size 1734157
|
||||
|
||||
Reference in New Issue
Block a user