rwjblue / git-repo-info

MIT License
112 stars 28 forks source link

After 1.1.3, some builds fail #19

Closed chriskrycho closed 8 years ago

chriskrycho commented 8 years ago

This is a fun one. Since the 1.13 publication, builds started failing for us on our TeamCity server, but only there. We can't reproduce locally (on OS X 10.11.5 or Windows 10 Pro).

The call to findRepo() is returning null, and that error condition isn't being handled: it's just passing the result directly into path.join, here. Curiously, 1.13 didn't actually change anything around this—but something about shipping it did break the TC build.

Our TeamCity box is running Windows Server 2008 and Git [will add shortly].

Here's the full stack trace:

TypeError: Path must be a string. Received null
    at assertPath (path.js:8:11)
    at Object.win32.resolve (path.js:130:5)
    at module.exports (D:\BuildAgent\work\8afa5390471260e3\node_modules\git-repo-info\index.js:128:16)
    at version (D:\BuildAgent\work\8afa5390471260e3\node_modules\git-repo-version\index.js:11:14)
    at Class.module.exports.config (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-app-version\index.js:10:46)
    at D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\models\project.js:223:27
    at Array.reduce (native)
    at Project.getAddonsConfig (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\models\project.js:221:22)
    at Project.config (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\models\project.js:199:29)
    at Class.module.exports._monkeyPatch_EmberDeprecate (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-deprecation-workflow\index.js:62:41)
    at Class.module.exports.setupPreprocessorRegistry (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-deprecation-workflow\index.js:114:12)
    at D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-preprocess-registry\preprocessors.js:27:13
    at Array.forEach (native)
    at setupRegistryForEachAddon (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-preprocess-registry\preprocessors.js:25:10)
    at Object.module.exports.setupRegistry (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli-preprocess-registry\preprocessors.js:46:3)
    at new EmberApp (D:\BuildAgent\work\8afa5390471260e3\node_modules\ember-cli\lib\broccoli\ember-app.js:108:5)
novaugust commented 8 years ago

this isn't just windows, came here after investigating build failures for our heroku release

chriskrycho commented 8 years ago

@novaugust interesting. I updated the title accordingly; does your error output show anything different than mine?

novaugust commented 8 years ago

Was just lookig at that to compare. Answer: same stack

rwjblue commented 8 years ago

Anyone have a repro locally?

drewnichols commented 8 years ago

This is also failing for me on all my heroku deploys

novaugust commented 8 years ago

@rwjblue yeah, figured it out. Clone your ember project somewhere and delete its .git folder

Without that, the path comes back null, et voila.

drewnichols commented 8 years ago

removing git folder worked for me as well locally

rwjblue commented 8 years ago

Why would this have changed between 1.1.2 and 1.1.3?

rwjblue commented 8 years ago

Got it. Fix incoming.

Samsinite commented 8 years ago

:+1:, this broke our heroku deploys as well. You are on top of everything @rwjblue.

rwjblue commented 8 years ago

Released v1.1.4

drewnichols commented 8 years ago

worked in heroku, thanks @rwjblue!

Voles commented 8 years ago

Works again using Docker, thanks @rwjblue!