rax-maas / dreadnot

deploy without dread
Apache License 2.0
631 stars 61 forks source link

handle failures gracefully #105

Closed mburns closed 5 years ago

mburns commented 8 years ago

Description

Dreadnot does not fail gracefully when an error in config or logic is encountere and instead crashes the process or renders an empty page.

via https://github.com/racker/sfo-devops/issues/21

TODO

mburns commented 8 years ago

118

mburns commented 8 years ago

Staging's Dreadnot is current failing in a spectacular way (see below). Hitting sub-pages (and deploying) works.

TypeError: /opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/lib/web/views/stacks.jade:22
    20|             td
    21|               a(href='/stacks/#{stack.name}/regions/#{region.name}') #{region.name}
  > 22|             td !{helpers.buildSingleDiffSegment(stack.github_href, region.deployed_revision, stack.latest_revision)}
    23|             td
    24|               - if (!region.latest_deployment)
    25|                 #{"never"}

Cannot call method 'slice' of undefined
    at Object.exports.trimRevision (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/lib/util/git.js:174:14)
    at Object.exports.trimRevision (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/lib/web/view_helpers.js:25:14)
    at Object.exports.buildSingleDiffSegment (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/lib/web/view_helpers.js:46:24)
    at stack (eval at <anonymous> (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/node_modules/jade/lib/jade.js:161:8), <anonymous>:372:38)
    at eval (eval at <anonymous> (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/node_modules/jade/lib/jade.js:161:8), <anonymous>:616:4)
    at eval (eval at <anonymous> (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/node_modules/jade/lib/jade.js:161:8), <anonymous>:987:4)
    at Object.<anonymous> (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/node_modules/jade/lib/jade.js:166:12)
    at ServerResponse.res._render (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/node_modules/express/lib/view.js:425:21)
    at ServerResponse.res.render (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/node_modules/express/lib/view.js:318:17)
    at render (/opt/dn-bundle-e470076b76059d67b7214f323681c83067835122/lib/web/handlers/web.js:32:9)