#update breaking change

1 messages ยท Page 1 of 1 (latest)

hoary hatch
#

Which one ? What are the issues ?

viral haven
#

One momen..

#

Right, I see where the confusion is, and it's my bad. When I run a dagger do I got some errors, that scrolled off of the screen quickly, and then I had a default "usage" options, which was confusing me, because I feel that it's suggesting that I wasn't running the correct command.

#

This is the output I'm getting: ```
dagger do buildApp
failed to load plan: actions.load.loadCLI: 1 errors in empty disjunction:
actions.load.loadCLI.image: field not allowed: rootfs:
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:84:10
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:128:10
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:130:3
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:130:16
./cue.mod/pkg/dagger.io/dagger/types.cue:9:6
./cue.mod/pkg/universe.dagger.io/docker/cli/load.cue:11:9
./cue.mod/pkg/universe.dagger.io/docker/image.cue:11:2
./cue.mod/pkg/universe.dagger.io/docker/run.cue:138:32
./cue.mod/pkg/universe.dagger.io/docker/run.cue:142:17
./cue.mod/pkg/universe.dagger.io/docker/run.cue:142:30
./cue.mod/pkg/universe.dagger.io/docker/run.cue:151:29
./cue.mod/pkg/universe.dagger.io/go/build.cue:55:10
./dagger.cue:12:1
./dagger.cue:107:13
./dagger.cue:108:12

Usage:
dagger do [flags]

Flags:
--cache-from stringArray External cache sources (eg. user/app:cache, type=local,src=path/to/dir)
--cache-to stringArray Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
--dry-run Dry run mode
-h, --help help for do
--no-cache Disable caching
--output string File path to write the action's output values. Prints to stdout if empty
--output-format string Format for output values (plain, json, yaml) (default "plain")
-p, --plan string Path to plan (defaults to current directory) (default ".")
--platform string Set target build platform (requires experimental)
-w, --with stringArray

Global Flags:
--experimental Enable experimental features
--log-format string Log format (auto, plain, tty, json) (default "auto")
-l, --log-level string Log level (default "info")

#

I think the output should stop after the errors, and not display usage?

hoary hatch
#

Your loadCLI action references a rootfs

viral haven
viral haven
#

Can anyone help me fix this please?

hoary hatch
#

Can you please paste your plan below ?

viral haven
hoary hatch
#

Do you want to go on dev-audio ?

hoary hatch
#

Do you want to join on audio so that I can explain you live ?

#

You call it here:

buildApp: go.#Build & {
    source: _config.source
}
#

and you reference the output of the go.#Build as the input of your cli.#Load

#

However, as you can see, the output is a rootfs and not an image

#

What you want is to build an image on which the buildApp.output is mounted (so the rootfs of the go directory that you just built)

viral haven
hoary hatch
#

That shall work:

load: {
            ssh: #SSH & {
                sshKey:        _config.ssh_key       //client.filesystem."~/.ssh/id_rsa".read.contents
                sshKnownHosts: _config.sshKnownHosts //client.filesystem."~/.ssh/known_hosts".read.contents
            }

            _baseImage: alpine.#Build & {
                packages: {
                    bash: {}
                    "openssh-client": {}
                    "docker-cli": {}
                }
            }

            loadCLI: cli.#Load & {
                image: _baseImage.output
                tag:   "tcs:v0.86"
                host:  "ssh://\(client.env.REMOTE_USER)@\(client.env.REMOTE_HOST)"
                mounts: app: {
                    dest:     "/buildApp"
                    contents: buildApp.output
                }
            }
        }
viral haven
hoary hatch
#

The feedback loop is too long atm, we should try debug live

viral haven
#
failed to load plan: "actions.buildDocker._ssh._exec.mounts.\"Bash scripts\"" is not set
"actions.buildDocker._ssh.mounts.\"Bash scripts\"" is not set
"actions.load.ssh._exec.mounts.\"Bash scripts\"" is not set
"actions.load.ssh.mounts.\"Bash scripts\"" is not set
"actions.buildDocker._ssh.script" is not set: :
viral haven