feat(cloud): default distributed plans to v2 (#3311)

* feat(cloud): default distributed plans to v2

* fix(cloud): address plan v2 review feedback

* fix(examples): document explicit v2 samples
This commit is contained in:
James Russo
2026-08-17 17:24:31 -04:00
committed by GitHub
parent 6b17c24f98
commit 17a2a00ed5
36 changed files with 403 additions and 143 deletions
@@ -7,8 +7,8 @@ const smoke = readFileSync(smokePath, "utf-8");
const dockerfile = readFileSync(join(import.meta.dir, "../Dockerfile"), "utf-8");
describe("GCP smoke ownership and protocol safety", () => {
it("defaults to v1 and requires an explicit v2 protocol argument", () => {
expect(smoke).toContain('PROTOCOLS="${PROTOCOLS:-v1}"');
it("defaults to v2 and retains explicit v1/v2 protocol arguments", () => {
expect(smoke).toContain('PROTOCOLS="${PROTOCOLS:-v2}"');
expect(smoke).toContain("--protocols)");
expect(smoke).toContain("PlanProtocol: $protocol");
expect(smoke).toContain("decodedFramesEqual");
@@ -77,8 +77,8 @@ describe("Cloud Workflows plan protocol routing", () => {
expect(source.match(/max_retries: 4/g)).toHaveLength(4);
});
it("keeps v1 as the default and rejects unknown protocols before plan", () => {
expect(source).toContain('default(map.get(args, "PlanProtocol"), "v1")');
it("defaults omitted protocol to v2 and rejects unknown protocols before plan", () => {
expect(source).toContain('default(map.get(args, "PlanProtocol"), "v2")');
expect(namedStep("selectPlanProtocol")).toMatchObject({
next: "unsupportedPlanProtocol",
});
@@ -26,9 +26,9 @@ main:
- planOutputGcsPrefix: ${args.PlanOutputGcsPrefix}
- outputGcsUri: ${args.OutputGcsUri}
- config: ${args.Config}
# Backward-compatible default. v2 is accepted only through an
# explicit top-level PlanProtocol opt-in.
- planProtocol: ${default(map.get(args, "PlanProtocol"), "v1")}
# Plan v2 is the default. Explicit v1 remains available during the
# deprecated monolithic-plan compatibility window.
- planProtocol: ${default(map.get(args, "PlanProtocol"), "v2")}
# ── Plan (Activity A) ────────────────────────────────────────────────────
- selectPlanProtocol: