Repository navigation
Closed
Description
What is the issue?
I tried dagger locally.
I was following the CI/CD in your local dev and got the following error
failed to load plan: "client.env.APP_NAME" is not set
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)
-h, --help help for do
--no-cache Disable caching
-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")
question
Do I need to prepare my .env file?
if so, I need to know how to do that.
reproduce
- $ brew install dagger/tap/dagger
- $ type dagger
- dagger is /opt/homebrew/bin/dagger
- $ docker --version
- Docker version 20.10.13, build a224086
- $ cd Desktop
- $ git clone https://github.com/dagger/dagger
- $ cd dagger
- $ git checkout v0.2.7
Note: switching to 'v0.2.7'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 18c19174 Merge pull request #2198 from dagger/dependabot/npm_and_yarn/website/async-2.6.4
- $ cd pkg/universe.dagger.io/examples/todoapp
- $ dagger do build
failed to load plan: "client.env.APP_NAME" is not set
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)
-h, --help help for do
--no-cache Disable caching
-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")
Ideally, I expected the following outputs
[✔] client.filesystem."./".read 0.1s
[✔] actions.deps 118.8s
[✔] actions.test.script 0.1s
[✔] actions.test 6.3s
[✔] actions.build.run.script 0.0s
[✔] actions.build.run 43.7s
[✔] actions.build.contents 0.4s
[✔] client.filesystem."./_build".write 0.1s
Dagger version
dagger 0.2.8 (92c8c7a) darwin/arm64
Homebrew version
Homebrew 3.4.9
Os version
- mac
- tips: apple m1
Metadata
Metadata
Assignees
Labels
No labels
Activity
lcswillems commentedon Apr 27, 2022
Same issue for me on Ubuntu 22.04
lcswillems commentedon Apr 27, 2022
I succeeded to make it working by skipping
git checkout v0.2.7marcosnils commentedon Apr 27, 2022
👋 there! apologies for the noise. Please do a
dagger project updateusing v0.2.8 and that should fix it. We did some stdlib changes that require an update to work. We've already added a PR to improve this UX for the next time we make such changes#2321
marcosnils commentedon Apr 27, 2022
👋 again. I gave an incorrect fix prematurely. The correct way to proceed here is to checkout v0.2.8 since it's the same dagger CLI version you're using. We've already updated our docs and we'll be fixing this so it doesn't happen again. 🙏
I'll leave this open until we implement the permanent fix.
lll-lll-lll-lll commentedon Apr 28, 2022
Thanks for your reply 👋
I changed the version with "git checkout v0.2.8" and ran the following command again and got an error.
$ git checkout v0.2.8
$ cd pkg/universe.dagger.io/examples/todoapp
$ dagger do build
What's problem ??
type dagger
dagger is /opt/homebrew/bin/dagger
marcosnils commentedon Apr 28, 2022
Interesting.. I can't seem to reproduce. Can you please run the following command and see if that fixes it?
docker rm -fv dagger-buildkitd && docker volume rm dagger-buildkitd(this wipes out the buildkit cache)dagger do build(inside the todoapp folder in the v0.2.8 tag)if this fails again, can you please post your
dagger version?lll-lll-lll-lll commentedon Apr 28, 2022
💪thak you for advice !
I have tried the commands you presented.
I got the following error
Could this error be related to m1?
marcosnils commentedon Apr 28, 2022
@lll-lll-lll-lll can you please add
--log-format plainand--log-level debugto your command and share again please?lll-lll-lll-lll commentedon Apr 28, 2022
@marcosnils command is $dagger do --log-format plain ?
is this right?
output is
marcosnils commentedon Apr 28, 2022
dagger do build --log-format plain --log-level debugshould be the commandlll-lll-lll-lll commentedon Apr 28, 2022
How far should I share the logs with you?
ALL?
helderco commentedon Apr 28, 2022
You can put it in a gist if you want. We're particularly interested in the output for the
depsaction.lll-lll-lll-lll commentedon Apr 28, 2022
Perhaps this is the part that needs to be shared
helderco commentedon Apr 28, 2022
Ok, network issues.
lll-lll-lll-lll commentedon Apr 28, 2022
Okay, what exactly should we start working on to solve this problem?
marcosnils commentedon Apr 28, 2022
Just to check if this helps can you manually edit https://github.com/dagger/dagger/blob/main/pkg/universe.dagger.io/examples/todoapp/todoapp.cue#L68 this line and make it
yarn install --network-timeout 120000instead and see if you can get it through?lll-lll-lll-lll commentedon Apr 28, 2022
thank you!

I manually edit ✋
It succeeded!
marcosnils commentedon Apr 28, 2022
🎉 congrats @lll-lll-lll-lll.
I don't think there's a lot more to do here since we only had one report about this case. I'll close this and, if another one comes up, we'll can clarify this on the docs or change the
todoappexample to make it more resilient.lll-lll-lll-lll commentedon Apr 28, 2022
thnaks It really helped me.
I'm going to use dagger in my application and contribute to it!
marcosnils commentedon Apr 28, 2022
🙌 happy to have you onboard and I'm sorry that you had a bumpy start. We're constantly improving Dagger, so any other feedback or contributions are welcome!