rainforestapp / fourchette

DEPRECATED - Your new best friend for isolated testing environments on Heroku.
MIT License
194 stars 23 forks source link

Node.js build not working #24

Closed dmitrytrager closed 10 years ago

dmitrytrager commented 10 years ago

Trying to fork Node.js app. Here is the log:

2014-07-21T17:20:13.830949+00:00 heroku[router]: at=info method=POST path="//hooks" host=stg-delta-web-fourchette.herokuapp.com request_id=ff6385b9-4731-4168-b936-c948cff4f656 fwd="192.30.252.35" dyno=web.1 connect=2 service=6 status=200 bytes=20943
2014-07-21T17:20:13.832214+00:00 app[web.1]: I, [2014-07-21T17:20:13.832140 #16]  INFO -- : Placeholder for before steps... (see callbacks.rb to override)
2014-07-21T17:20:13.830693+00:00 app[web.1]: 192.30.252.35 - - [21/Jul/2014 17:20:13] "POST //hooks HTTP/1.1" 200 15 0.0013
2014-07-21T17:20:13.928398+00:00 app[web.1]: I, [2014-07-21T17:20:13.928265 #16]  INFO -- : Creating delta-web-fourchette-pr-58
2014-07-21T17:20:14.226966+00:00 app[web.1]: I, [2014-07-21T17:20:14.226829 #16]  INFO -- : Copying configs from stg-delta-web-pr to delta-web-fourchette-pr-58
2014-07-21T17:20:14.585446+00:00 app[web.1]: I, [2014-07-21T17:20:14.585332 #16]  INFO -- : Copying addons from stg-delta-web-pr to delta-web-fourchette-pr-58
2014-07-21T17:20:14.685569+00:00 app[web.1]: I, [2014-07-21T17:20:14.685462 #16]  INFO -- : Adding newrelic:wayne to delta-web-fourchette-pr-58
2014-07-21T17:20:16.559465+00:00 app[web.1]: I, [2014-07-21T17:20:16.559329 #16]  INFO -- : Adding pgbackups:plus to delta-web-fourchette-pr-58
2014-07-21T17:20:17.017844+00:00 app[web.1]: I, [2014-07-21T17:20:17.017711 #16]  INFO -- : Copying Postgres's data from stg-delta-web-pr to delta-web-fourchette-pr-58
2014-07-21T17:20:18.168417+00:00 app[web.1]: I, [2014-07-21T17:20:18.168303 #16]  INFO -- : Cloning repository...
2014-07-21T17:20:19.033223+00:00 app[web.1]: I, [2014-07-21T17:20:19.033027 #16]  INFO -- : Preparing tarball...
2014-07-21T17:20:19.148040+00:00 app[web.1]: I, [2014-07-21T17:20:19.147799 #16]  INFO -- : Tarball to URL as a service in progress...
2014-07-21T17:20:19.141613+00:00 app[web.1]: tar: .: file changed as we read it
2014-07-21T17:20:20.035939+00:00 heroku[router]: at=info method=GET path="//Datavail/delta-front-end/791540cf-194e-4150-93c6-cde451eee640/1405963519" host=stg-delta-web-fourchette.herokuapp.com request_id=b55d3ea4-29ac-4805-a637-27a4f79575dd fwd="54.83.111.8" dyno=web.1 connect=2 service=57 status=200 bytes=505
2014-07-21T17:20:19.936448+00:00 app[web.1]: I, [2014-07-21T17:20:19.936289 #16]  INFO -- : Start of the build process on Heroku...
2014-07-21T17:20:20.035214+00:00 app[web.1]: 54.83.111.8 - - [21/Jul/2014 17:20:20] "GET //Datavail/delta-front-end/791540cf-194e-4150-93c6-cde451eee640/1405963519 HTTP/1.1" 200 1071959 0.0539
2014-07-21T17:20:19.981817+00:00 app[web.1]: I, [2014-07-21T17:20:19.981707 #25]  INFO -- : Serving a tarball!
2014-07-21T17:20:50.171814+00:00 app[web.1]: I, [2014-07-21T17:20:50.171627 #16]  INFO -- : Placeholder for after steps... (see callbacks.rb to override)

And nothing is built at the end. Also it always add PGBackups addon to forked app and to fork, when it should not do it for node.js app.

jipiboily commented 10 years ago

There are two issues in one here :)

  1. PGBackups gets added, wether it is required or not.
  2. What is your build log on Heroku is telling you? You can see that in the dashboard, I think in the activity tab (from the top of my head)...

Regarding #1, I think it was addressed. What does your Gemfile look like? You could try changing the Fourchette line for gem 'fourchette', github: 'rainforestapp/fourchette' and run a bundle update fourchette, commit, then push...

Let me know how that goes.

dmitrytrager commented 10 years ago

Looking at the build log:

bower backbone-validation#~0.9.1         not-cached git://github.com/thedersen/backbone.validation.git#~0.9.1
       bower backbone-validation#~0.9.1            resolve git://github.com/thedersen/backbone.validation.git#~0.9.1
       bower jquery#~2.0.3                           error Arguments to path.join must be strings

       Stack trace:
       TypeError: Arguments to path.join must be strings
           at path.js:360:15
           at Array.filter (native)
           at Object.exports.join (path.js:358:36)
           at GitHubResolver._checkout (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/lib/core/resolvers/GitHubResolver.js:54:21)
           at /tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/lib/core/resolvers/GitResolver.js:69:21
           at _fulfilled (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:798:54)
           at self.promiseDispatch.done (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:827:30)
           at Promise.promise.promiseDispatch (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:760:13)
           at /tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:574:44
           at flush (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:108:17)

       Console trace:
       Trace
           at StandardRenderer.error (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/lib/renderers/StandardRenderer.js:74:17)
           at Logger.updateNotifier.packageName (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/bin/bower:109:18)
           at Logger.emit (events.js:95:17)
           at Logger.emit (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
           at /tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/lib/commands/install.js:27:16
           at _rejected (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:808:24)
           at /tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:834:30
           at Promise.when (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:1079:31)
           at Promise.promise.promiseDispatch (/tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:752:41)
           at /tmp/build_5eda2ab1-254d-4cfb-b565-185eb10aac32/node_modules/bower/node_modules/q/q.js:574:44

       System info:
       Bower version: 1.2.8
       Node version: 0.10.29
       OS: Linux 3.8.11-ec2 x64

So it has some problems with jquery. Meanwhile, my CI env can deploy original version without this problem:

bower backbone-validation#~0.9.1            install backbone-validation#0.9.1
       bower jqtree#0.20.0                         install jqtree#0.20.0
       bower jquery#~2.0.3                         install jquery#2.0.3
       bower marionette#~1.6.1                     install marionette#1.6.4
       bower backbone.babysitter#~0.1.0            install backbone.babysitter#0.1.4
       bower backbone.wreqr#~1.0.0                 install backbone.wreqr#1.0.1
       bower underscore#1.4.4 - 1.6.0              install underscore#1.6.0
       bower bootstrap#~3.1.0                      install bootstrap#3.1.1
       bower backbone#1.0.0 - 1.1.2                install backbone#1.1.2

       requirejs#2.1.14 bower_components/requirejs

       almond#0.2.9 bower_components/almond

What could be the reason?

jipiboily commented 10 years ago

Fourchette is doing a git clone of your repository on your Fourchette app, creating a tarball and serving it to Heroku's build API. Anything in that process that is obviously wrong or that is very different from the CI? Probably?

PS: I am not a Node guy, so I might miss something super obvious.

jipiboily commented 10 years ago

How the tarball is created is here: https://github.com/rainforestapp/fourchette/blob/15ff7d1f3f7fcfdcacce1839d6b1448f254ff366/lib/fourchette/tarball.rb

jipiboily commented 10 years ago

Also, "why a tarball?" one may ask? Because Heroku's build API only supports that, at least, for now.

dmitrytrager commented 10 years ago

The only thing CI does is: git push --force heroku $BRANCH_NAME:master

dmitrytrager commented 10 years ago

Probable, tarball can be the reason. I guess I need to think why)

jipiboily commented 10 years ago

@dmitrytrager: here is one thing you could do maybe to test that, maybe it won't work, just thinking out loud...

On a different machine (just to rule out anything from your machine):

Are you having the same issue?

dmitrytrager commented 10 years ago

@jipiboily tried this approach, no issues detected

jipiboily commented 10 years ago

I guess this is a private repo you are using? Any chance to have a reproducible repo available publicly so that I can help further?

jipiboily commented 10 years ago

Closing as I didn't get any news from @dmitrytrager. Feel free to re-open if it's still an issue and you can provide me a way to reproduce it.