Skip to content

Commit 7f48a68

Browse files
authored
feat!: remove Plan v1 distributed transport (#6970)
* feat!: remove Plan v1 distributed transport BREAKING CHANGE: Cloud adapters accept only Plan v2; producer v1 exports are removed. * ci: authorize Plan v1 cleanup deletions * docs: avoid citing generated smoke result file * fix(gcp): reject unsupported plan protocols in workflow * ci: preserve gcp package size reduction * fix: reject stale Plan v1 SDK options * chore: remove retired Plan parity scripts
1 parent 99223d9 commit 7f48a68

60 files changed

Lines changed: 506 additions & 5188 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/packages/aws-lambda.mdx‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,15 @@ const progress = await getRenderProgress({ executionArn: handle.executionArn });
8989
console.log(progress.status, progress.overallProgress, progress.costs.displayCost);
9090
```
9191

92-
Plan v2 is the default because workers fetch manifest-selected
93-
content-addressed artifacts. The SDK sends explicit v2 when `planProtocol` is
94-
omitted. Deprecated v1 compatibility remains available by passing
95-
`planProtocol: "v1"`.
92+
Plan v2 is the only supported distributed plan transport. Workers fetch
93+
manifest-selected content-addressed artifacts, and the SDK sends explicit v2
94+
without requiring a protocol option.
9695

9796
<Warning>
9897
For an existing installation, pause new renders and drain active Step
9998
Functions executions. Redeploy the Lambda handler and SAM/CDK state machine
10099
from the same package version before upgrading the application SDK. Older
101-
infrastructure may default omission to v1 or lack v2 support.
100+
infrastructure may lack the Plan v2-only request and locator contract.
102101
</Warning>
103102

104103
`renderToLambda()` validates the distributed render config before starting the Step Functions execution, so invalid dimensions, formats, chunk sizes, or payload sizes fail synchronously.

‎docs/packages/gcp-cloud-run.mdx‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,15 @@ while (progress.status === "running") {
9696
console.log(progress.status, progress.outputFile, progress.costs.displayCost);
9797
```
9898

99-
Plan v2 is the default because workers fetch manifest-selected
100-
content-addressed artifacts. The SDK sends explicit v2 when `planProtocol` is
101-
omitted. Deprecated v1 compatibility remains available by passing
102-
`planProtocol: "v1"`.
99+
Plan v2 is the only supported distributed plan transport. Workers fetch
100+
manifest-selected content-addressed artifacts, and the SDK sends explicit v2
101+
without requiring a protocol option.
103102

104103
<Warning>
105104
For an existing installation, pause new renders and drain active workflow
106105
executions. Redeploy the Cloud Run image and Cloud Workflows definition from
107106
the same package version before upgrading the application SDK. Older
108-
workflows may default omission to v1 or lack v2 support.
107+
workflows may lack the Plan v2-only request and locator contract.
109108
</Warning>
110109

111110
Pass `projectDir` for one-shot uploads, or call `deploySite()` separately and reuse the returned site handle across many renders.

‎examples/aws-lambda/README.md‎

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,17 @@ EOF
9191

9292
The Step Functions execution kicks off Plan, fans out RenderChunk via
9393
the Map state, and finally Assemble. Final mp4 lands at `OutputS3Uri`.
94-
Plan v2 is the default when `PlanProtocol` is absent. V2 uses separate
95-
manifest and content-addressed artifact locators throughout the workflow and
96-
never places a v2 object in `PlanS3Uri`. The deprecated v1 transport remains
97-
available by sending `"PlanProtocol": "v1"` explicitly.
94+
Plan v2 is the only supported plan transport. It uses separate manifest and
95+
content-addressed artifact locators throughout the workflow.
9896

9997
### Upgrading an existing stack
10098

10199
Pause new renders and let active Step Functions executions drain before the
102100
upgrade. Redeploy the Lambda handler and this state machine (or the matching
103101
CDK construct) from the same package version before upgrading the application
104-
that calls `renderToLambda`. The new SDK sends explicit v2 by default, while
105-
older infrastructure may default omission to v1 or lack v2 support. Keep
106-
passing `planProtocol: "v1"` until the infrastructure redeploy completes if
107-
you need a staged migration.
102+
that calls `renderToLambda`. The new SDK sends explicit v2, while older
103+
infrastructure may lack the Plan v2-only contract. Keep the application on its
104+
previous package version until the infrastructure redeploy completes.
108105

109106
## Local invocation
110107

@@ -121,10 +118,8 @@ sam validate
121118
sam local invoke RenderFunction --event sample-events/plan.json
122119
```
123120

124-
The `sample-events/` directory ships three tiers for each action:
125-
`*.json` demonstrates default v2 with `PlanProtocol` omitted, `*-v1.json`
126-
demonstrates deprecated explicit-v1 compatibility, and `*-v2.json`
127-
demonstrates callers that stamp v2 explicitly. They reference fake S3 URIs —
121+
The `sample-events/` directory ships default-v2 events with `PlanProtocol`
122+
omitted and `*-v2.json` events that stamp v2 explicitly. They reference fake S3 URIs —
128123
useful for sanity-checking the handler's dispatch logic; not for full
129124
end-to-end testing (real S3 calls require credentials and a project zip to
130125
actually exist).
@@ -143,7 +138,6 @@ script:
143138
./scripts/smoke.sh \
144139
--fixture mp4-h264-sdr \
145140
--chunk-counts 2,4,8,16 \
146-
--plan-protocol both \
147141
--psnr-threshold 40 \
148142
--reserved-concurrency 8
149143

@@ -159,13 +153,8 @@ per-run stack name, renders the fixture at each chunk count via the
159153
Step Functions state machine, PSNR-compares against the in-process
160154
baseline (which is git-LFS tracked under
161155
`packages/producer/tests/distributed/<fixture>/output/`), captures
162-
per-execution Step Functions history, and tears the stack down. Use
163-
`--plan-protocol both` to run v1 and v2 through the same deployed Lambda
164-
package and baseline. Each v1/v2 pair is also gated directly on per-chunk
165-
hashes from Step Functions history, normalized decoded RGBA frame hashes,
166-
decoded 48 kHz stereo s16le PCM hashes and byte counts, normalized stream
167-
metadata, and duration. Encoded MP4 SHA equality is reported but is
168-
informational unless `--require-encoded-sha-equal` is set. The script
156+
per-execution Step Functions history, and tears the stack down. Encoded MP4
157+
SHA equality can be required with `--require-encoded-sha-equal`. The script
169158
assigns unique function/state-machine names, uses a
170159
dedicated temporary SAM artifact bucket, and removes render objects,
171160
retained buckets, the implicit Lambda log group, and deployment artifacts
@@ -194,11 +183,9 @@ spend is roughly $0.10-$0.20 per pass before S3 transfer. Lower
194183

195184
Outputs land under `<repo-root>/lambda-smoke-artifacts/`:
196185

197-
- `results.json` — `planProtocol × chunkCount × wallClockMs × psnrAvgDb`
198-
- `semantic-comparisons.json` — direct v1/v2 semantic gate results
199-
- `renders/<protocol>-N<N>-output.mp4` — each rendered variant
200-
- `renders/<protocol>-N<N>-history.json` — full Step Functions execution history
201-
- `renders/v1-v2-N<N>.*` — normalized frame hashes, ffprobe metadata, and comparison JSON
186+
- generated results summary — `chunkCount × wallClockMs × psnrAvgDb`
187+
- `renders/v2-N<N>-output.mp4` — each rendered variant
188+
- `renders/v2-N<N>-history.json` — full Step Functions execution history
202189

203190
Prerequisites: `aws` (v2), `sam` (≥ 1.100), `bun` (≥ 1.3), `ffmpeg`,
204191
`jq`, `zip`. AWS credentials come from the standard resolution chain

‎examples/aws-lambda/sample-events/assemble-v1.json‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎examples/aws-lambda/sample-events/plan-v1.json‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎examples/aws-lambda/sample-events/render-chunk-v1.json‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎examples/aws-lambda/scripts/_semantic-compare.sh‎

Lines changed: 0 additions & 239 deletions
This file was deleted.

0 commit comments

Comments
 (0)