Skip to content

[docs][Getting Started] failed to load plan: client.env.APP_NAME #2327

Closed

Description

@lll-lll-lll-lll

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

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

Activity

  1. lcswillems commented on Apr 27, 2022

    @lcswillems

    Same issue for me on Ubuntu 22.04

  2. lcswillems commented on Apr 27, 2022

    @lcswillems

    I succeeded to make it working by skipping git checkout v0.2.7

  3. marcosnils commented on Apr 27, 2022

    @marcosnils
    Contributor

    👋 there! apologies for the noise. Please do a dagger project update using 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

  4. marcosnils commented on Apr 27, 2022

    @marcosnils
    Contributor

    wave there! apologies for the noise. Please do a dagger project update using 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

    👋 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.

  5. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    👋 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.

    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

    9:44AM FTL failed to execute plan: task failed: actions.deps._dag."2"._exec: process 
    "/bin/bash /bash/scripts/run.sh --norc -e -o pipefail" did not complete successfully: exit code: 1
    
    

    What's problem ??

    type dagger

    dagger is /opt/homebrew/bin/dagger

  6. marcosnils commented on Apr 28, 2022

    @marcosnils
    Contributor

    What's problem ??

    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?

  7. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    if this fails again, can you please post your dagger version?

    💪thak you for advice !
    I have tried the commands you presented.
    I got the following error
    Could this error be related to m1?

    スクリーンショット 2022-04-28 21 37 30

  8. marcosnils commented on Apr 28, 2022

    @marcosnils
    Contributor

    @lll-lll-lll-lll can you please add --log-format plain and --log-level debug to your command and share again please?

  9. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    @marcosnils command is $dagger do --log-format plain ?
    is this right?
    output is

    ~/Desktop/dagger/pkg/universe.dagger.io/examples/todoapp 0xpeipei dagger do --log-format plain
    Usage:
      dagger do  [flags]
    
    Options
    
    
    Available Actions:
     deps
     test
     build
     deploy
    
    
    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")
    ~/Desktop/dagger/pkg/universe.dagger.io/examples/todoapp 0xpeipei
    
    
  10. marcosnils commented on Apr 28, 2022

    @marcosnils
    Contributor

    dagger do build --log-format plain --log-level debug should be the command

  11. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    How far should I share the logs with you?
    ALL?

  12. helderco commented on Apr 28, 2022

    @helderco
    Contributor

    You can put it in a gist if you want. We're particularly interested in the output for the deps action.

  13. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    Perhaps this is the part that needs to be shared

    11:02PM INF actions.deps._dag."2"._exec | computing
    11:02PM DBG actions.deps._dag."2"._exec | dependency detected    dependency=actions.deps._dag."0"._dag."0"._op
    11:02PM DBG actions.deps._dag."2"._exec | dependency detected    dependency=actions.deps._dag."1"._copy
    11:02PM DBG actions.deps._dag."2"._exec | dependency detected    dependency=actions.deps._dag."2".script._write
    11:02PM DBG actions.deps._dag."1"._copy |
    11:02PM DBG actions.deps._dag."1"._copy | #11 Copy / /src
    11:02PM DBG actions.deps._dag."1"._copy | #11 sha256:4da89edd4257e73f1eca5bba3163f10732e3313a1b062a1c16f3a198b591a81a
    11:02PM DBG actions.deps._dag."1"._copy | #11 CACHED
    11:02PM DBG actions.deps._dag."2"._exec |
    11:02PM DBG actions.deps._dag."2"._exec | #12 Exec ["/bin/bash", "/bash/scripts/run.sh", "--norc", "-e", "-o", "pipefail"]
    11:02PM DBG actions.deps._dag."2"._exec | #12 sha256:1960e30d8533a49e7c21f4dba112aaa48144175eba4ab5a6849cc45c19ca3676
    11:02PM INF actions.deps._dag."2"._exec | #12 3.833 yarn config v1.22.17
    11:02PM INF actions.deps._dag."2"._exec | #12 3.942 success Set "cache-folder" to "/cache/yarn".
    11:02PM INF actions.deps._dag."2"._exec | #12 3.942 Done in 0.13s.
    11:02PM INF actions.deps._dag."2"._exec | #12 4.490 yarn install v1.22.17
    11:02PM INF actions.deps._dag."2"._exec | #12 5.451 [1/4] Resolving packages...
    11:02PM INF actions.deps._dag."2"._exec | #12 9.057 [2/4] Fetching packages...
    11:04PM INF actions.deps._dag."2"._exec | #12 93.35 info There appears to be trouble with your network connection. Retrying...
    11:04PM INF actions.deps._dag."2"._exec | #12 131.4 info There appears to be trouble with your network connection. Retrying...
    11:05PM INF actions.deps._dag."2"._exec | #12 170.7 info There appears to be trouble with your network connection. Retrying...
    11:06PM INF actions.deps._dag."2"._exec | #12 204.7 info There appears to be trouble with your network connection. Retrying...
    11:06PM INF actions.deps._dag."2"._exec | #12 244.4 error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz: ESOCKETTIMEDOUT".
    11:06PM INF actions.deps._dag."2"._exec | #12 244.4 info If you think this is a bug, please open a bug report with the information provided in "/src/yarn-error.log".
    11:06PM INF actions.deps._dag."2"._exec | #12 244.4 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    11:06PM DBG actions.deps._dag."2"._exec | #12 ERROR: process "/bin/bash /bash/scripts/run.sh --norc -e -o pipefail" did not complete successfully: exit code: 1
    11:06PM ERR actions.deps._dag."2"._exec | failed: process "/bin/bash /bash/scripts/run.sh --norc -e -o pipefail" did not complete successfully: exit code: 1
        duration=4m6.6s
    11:06PM DBG actions.deps._dag."2"._exec | ------
    11:06PM DBG actions.deps._dag."2"._exec | > @actions.deps._dag."2"._exec@ Exec ["/bin/bash", "/bash/scripts/run.sh", "--norc", "-e", "-o", "pipefail"]:
    11:06PM DBG actions.deps._dag."2"._exec | ------
    11:06PM FTL system | failed to execute plan: task failed: actions.deps._dag."2"._exec: process "/bin/bash /bash/scripts/run.sh --norc -e -o pipefail" did not complete successfully: exit code: 1
    
    
  14. helderco commented on Apr 28, 2022

    @helderco
    Contributor

    Ok, network issues.

  15. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    Okay, what exactly should we start working on to solve this problem?

  16. marcosnils commented on Apr 28, 2022

    @marcosnils
    Contributor

    Okay, what exactly should we start working on to solve this problem?

    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 120000 instead and see if you can get it through?

  17. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    thank you!
    I manually edit ✋
    It succeeded!
    スクリーンショット 2022-04-29 0 35 41

  18. marcosnils commented on Apr 28, 2022

    @marcosnils
    Contributor

    🎉 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 todoapp example to make it more resilient.

  19. lll-lll-lll-lll commented on Apr 28, 2022

    @lll-lll-lll-lll
    Author

    thnaks It really helped me.
    I'm going to use dagger in my application and contribute to it!

  20. marcosnils commented on Apr 28, 2022

    @marcosnils
    Contributor

    🙌 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions