Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

Plugin crashes when pull request has merge conflict #75

Open iradul opened 7 years ago

iradul commented 7 years ago

Our private github repo is triggering Strider every time someone creates pull request. If pull request can be successfully merged everything works well but if there is a merge conflict strider-git module crashes and I'm ending up with forever pending status ( strider-github-status ): strider_issue

This is where job gets stuck :

  strider-git:worker Git Version:1.8 +360ms
  strider-git gitane command done git clone --recursive git@github.com:*******.git . --branch master; exit code 0; duration 1223 +1s
  strider-git Gitane error: +259ms undefined
  strider-git gitane command done git fetch origin refs/pull/14/merge; exit code 128; duration 258 +1ms

Exception is coming from git fetch origin refs/pull/14/merge which can't be resolved since there is a merge conflict. Everything goes south on prepare stage:

Error: Fetch refs/pull/14/merge failed with code 500
    at badCode (/usr/local/strider/node_modules/strider-github/node_modules/strider-git/worker.js:93:11)
    at /usr/local/strider/node_modules/strider-github/node_modules/strider-git/worker.js:183:19
    at /usr/local/strider/node_modules/strider-github/node_modules/strider-git/lib/index.js:126:5
    at Function.<anonymous> (/usr/local/strider/node_modules/strider-github/node_modules/gitane/index.js:173:7)
    at next (/usr/local/strider/node_modules/strider-github/node_modules/step/lib/step.js:51:23)
    at ChildProcess.<anonymous> (/usr/local/strider/node_modules/strider-github/node_modules/gitane/index.js:159:9)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:498:12)
knownasilya commented 7 years ago

From your point of view, should it fail the build?

iradul commented 7 years ago

Yes absolutely, that would be much better indication that something is wrong. For example Jenkins has ability to handle test/build errors with special kind of status message (failure or unstable).