diff --git a/.gitignore b/.gitignore index 2d73227cc4..0091b7092a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ bazel-zoekt bazel-src-cli .DS_Store samples +.amp diff --git a/cmd/src/batch_common.go b/cmd/src/batch_common.go index e294347dcf..59b462ba96 100644 --- a/cmd/src/batch_common.go +++ b/cmd/src/batch_common.go @@ -373,6 +373,10 @@ func executeBatchSpec(ctx context.Context, opts executeBatchSpecOpts) (err error } execUI.ParsingBatchSpecSuccess() + if batchSpec.Version == 3 { + return errors.New("batch spec version 3 is not supported for local execution, please run server-side") + } + execUI.ResolvingNamespace() namespace, err := svc.ResolveNamespace(ctx, opts.flags.namespace) if err != nil { diff --git a/internal/batches/service/service_test.go b/internal/batches/service/service_test.go index da877edc33..bdff83acfc 100644 --- a/internal/batches/service/service_test.go +++ b/internal/batches/service/service_test.go @@ -282,7 +282,7 @@ version: 99 name: test-spec description: A test spec `, - expectedErr: errors.New("parsing batch spec: version: version must be one of the following: 1, 2"), + expectedErr: errors.New("parsing batch spec: version: version must be one of the following: 1, 2, 3"), }, { name: "mount absolute file", diff --git a/lib/batches/schema/batch_spec_stringdata.go b/lib/batches/schema/batch_spec_stringdata.go index 6d412a0a33..1123970faf 100644 --- a/lib/batches/schema/batch_spec_stringdata.go +++ b/lib/batches/schema/batch_spec_stringdata.go @@ -15,7 +15,7 @@ const BatchSpecJSON = `{ "version": { "type": "number", "description": "The version of the batch spec schema. Defaults to 1.", - "enum": [1, 2] + "enum": [1, 2, 3] }, "name": { "type": "string",