Skip to content

Commit 7cf08b1

Browse files
authored
chore: handle batch spec v3 (#1306)
1 parent 36657d0 commit 7cf08b1

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ bazel-zoekt
1414
bazel-src-cli
1515
.DS_Store
1616
samples
17+
.amp

cmd/src/batch_common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ func executeBatchSpec(ctx context.Context, opts executeBatchSpecOpts) (err error
373373
}
374374
execUI.ParsingBatchSpecSuccess()
375375

376+
if batchSpec.Version == 3 {
377+
return errors.New("batch spec version 3 is not supported for local execution, please run server-side")
378+
}
379+
376380
execUI.ResolvingNamespace()
377381
namespace, err := svc.ResolveNamespace(ctx, opts.flags.namespace)
378382
if err != nil {

internal/batches/service/service_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ version: 99
282282
name: test-spec
283283
description: A test spec
284284
`,
285-
expectedErr: errors.New("parsing batch spec: version: version must be one of the following: 1, 2"),
285+
expectedErr: errors.New("parsing batch spec: version: version must be one of the following: 1, 2, 3"),
286286
},
287287
{
288288
name: "mount absolute file",

lib/batches/schema/batch_spec_stringdata.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)