teamhephy / builder

MIT License
3 stars 12 forks source link

Builder checks /tmp/env vars before building and fails #4

Closed Cryptophobia closed 6 years ago

Cryptophobia commented 6 years ago

We're trying to create new apps and the first push with the cache enabled gives the following:

Starting build... but first, coffee!
-----> Restoring cache...
       No cache file found. If this is the first deploy, it will be created now.
cp: cannot stat '/tmp/env/*': No such file or directory
remote: 2018/03/13 18:03:06 Error running git receive hook [Build pod exited with code 1, stopping build.]

With the cache disabled it works, but then deploys take upwards of 4 or 5 minutes due to the sheer number of Python deps. Thoughts?

"There's an if statement in the builder script that checks if the directory is empty, then it does that cp. I don't have it in front of me--90% of this investigation was yesterday--but I suspect it's failing to detect this case. And of course 99% of the time you've got env vars."

"I don't know if that's the underlying bug, just that that's what fixed it. I suspect DEIS_DISABLE_CACHE worked because those are passed through to the app, not because there's a problem with caching."

Cryptophobia commented 6 years ago

I ran into this today:

Counting objects: 424, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (405/405), done.
Writing objects: 100% (424/424), 1.12 MiB | 10.73 MiB/s, done.
Total 424 (delta 79), reused 12 (delta 0)
remote: Resolving deltas: 100% (79/79), done.
Starting build... but first, coffee!
-----> Restoring cache...
       No cache file found. If this is the first deploy, it will be created now.
cp: cannot stat '/tmp/env/*': No such file or directory
Cryptophobia commented 6 years ago

Adding a simple env key fixed this error, so this is definitely a code change in the builder:

Counting objects: 424, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (405/405), done.
Writing objects: 100% (424/424), 1.12 MiB | 10.25 MiB/s, done.
Total 424 (delta 80), reused 12 (delta 0)
remote: Resolving deltas: 100% (80/80), done.
Starting build... but first, coffee!
-----> Restoring cache...
       No cache file found. If this is the first deploy, it will be created now.
-----> Node.js app detected
Cryptophobia commented 6 years ago

This one is priority because it is annoying and prevents people from deploying an app right away!

yebyen commented 6 years ago

🥇 we ran into this issue with a new Deis user this morning, it is confirmed to be a bug

davidguttman commented 6 years ago

Started a new cluster and just ran into this one today. Also confirmed that using deis config:push made the problem go away.