Skip to content

Actions with no core buildkit actions don't trigger filesystem write #1789

@shykes

Description

@shykes

Problem

Some actions don't need to call buildkit. For example a simple string transformation using only CUE builtins. These actions can be called with dagger do, but any client filesystem writes that depend on them will not be triggered.

Example

import (
  "strings"
  "dagger.io/dagger"
)

dagger.#Plan & {
  client: filesystem: write: "./output": contents: actions.upper.output
  actions: upper: {
    input: "hello, world"
    output: strings.ToUpper(input)
  }
}
$ dagger do upper
$ cat output
cat: can't open 'output': No such file or directory

Workaround

A pure cue action can wrap its output in dagger.#Nop, which will trigger client filesystem writes. Requires merging #1790.

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions