feat(producer): version distributed plan protocol (#2777)

This commit is contained in:
James Russo
2026-07-25 19:17:07 -04:00
committed by GitHub
parent e4ca6e7ce2
commit f5efcd1315
15 changed files with 609 additions and 5 deletions
@@ -64,6 +64,8 @@ const EXPECTED_NON_RETRYABLE_ERRORS = new Set([
"BROWSER_GPU_NOT_SOFTWARE",
"FONT_FETCH_FAILED",
"PLAN_TOO_LARGE",
"PLAN_PROTOCOL_UNSUPPORTED",
"PlanProtocolUnsupportedError",
"FORMAT_NOT_SUPPORTED_IN_DISTRIBUTED",
"ChromeBinaryUnavailableError",
]);
@@ -200,6 +200,8 @@ export class HyperframesRenderStack extends Construct {
"BROWSER_GPU_NOT_SOFTWARE",
"FONT_FETCH_FAILED",
"PLAN_TOO_LARGE",
"PLAN_PROTOCOL_UNSUPPORTED",
"PlanProtocolUnsupportedError",
"FORMAT_NOT_SUPPORTED_IN_DISTRIBUTED",
"ChromeBinaryUnavailableError",
];
@@ -208,12 +210,16 @@ export class HyperframesRenderStack extends Construct {
"PLAN_HASH_MISMATCH",
"S3_URI_NOT_ALLOWED",
"BROWSER_GPU_NOT_SOFTWARE",
"PLAN_PROTOCOL_UNSUPPORTED",
"PlanProtocolUnsupportedError",
"ChromeBinaryUnavailableError",
];
const NON_RETRYABLE_ASSEMBLE = [
"FFMPEG_VERSION_MISMATCH",
"PLAN_HASH_MISMATCH",
"S3_URI_NOT_ALLOWED",
"PLAN_PROTOCOL_UNSUPPORTED",
"PlanProtocolUnsupportedError",
"FORMAT_NOT_SUPPORTED_IN_DISTRIBUTED",
"ChromeBinaryUnavailableError",
];
+8 -1
View File
@@ -18,7 +18,12 @@ import { afterEach, beforeEach, describe, expect, it, mock } from "bun:test";
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import type { AssembleResult, ChunkResult, PlanResult } from "@hyperframes/producer/distributed";
import {
CURRENT_PLAN_PROTOCOL,
type AssembleResult,
type ChunkResult,
type PlanResult,
} from "@hyperframes/producer/distributed";
import type { AssembleEvent, LambdaEvent, PlanEvent, RenderChunkEvent } from "./events.js";
import { handler, unwrapEvent } from "./handler.js";
@@ -157,6 +162,7 @@ describe("handler dispatch", () => {
writeFileSync(join(planDir, "meta", "chunks.json"), "[]");
return {
planDir,
planProtocol: CURRENT_PLAN_PROTOCOL,
planHash: "fakehash",
chunkCount: 4,
totalFrames: 720,
@@ -224,6 +230,7 @@ describe("handler dispatch", () => {
writeFileSync(join(planDir, "meta", "chunks.json"), "[]");
return {
planDir,
planProtocol: CURRENT_PLAN_PROTOCOL,
planHash: "fakehash",
chunkCount: 1,
totalFrames: 30,