From b33b75a570d11d361d682f45828314823f79537d Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 7 Mar 2022 16:02:42 -0800 Subject: [PATCH] runner: switch to client API Signed-off-by: Andrea Luzzardi --- plan/plan.go | 2 +- plan/runner.go | 4 ++-- tests/plan/outputs/files/do.cue | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plan/plan.go b/plan/plan.go index e116c91c..2b5c7702 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -17,7 +17,7 @@ import ( var ( ActionSelector = cue.Str("actions") - OutputSelector = cue.Str("outputs") + ClientSelector = cue.Str("client") ) type Plan struct { diff --git a/plan/runner.go b/plan/runner.go index c3ec0d5b..928a0b2d 100644 --- a/plan/runner.go +++ b/plan/runner.go @@ -89,9 +89,9 @@ func (r *Runner) initTasks() { } } - // If an `output` task is targeting an allowed task, allow the output task as well + // If a `client` task is targeting an allowed task, allow the output task as well for _, t := range flow.Tasks() { - if t.Path().Selectors()[0] != OutputSelector { + if t.Path().Selectors()[0] != ClientSelector { continue } for _, dep := range t.Dependencies() { diff --git a/tests/plan/outputs/files/do.cue b/tests/plan/outputs/files/do.cue index 56b5ebc6..e71c4f63 100644 --- a/tests/plan/outputs/files/do.cue +++ b/tests/plan/outputs/files/do.cue @@ -8,10 +8,7 @@ import ( ) dagger.#Plan & { - outputs: files: test: { - dest: "./test_do" - contents: actions.test.one.export.files["/output.txt"] - } + client: filesystem: "./test_do": write: contents: actions.test.one.export.files["/output.txt"] actions: { image: alpine.#Build & {