Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

production not on master/ unhandled promise rejection #142

Closed
2 tasks done
vsmart opened this issue Aug 13, 2018 · 4 comments
Closed
2 tasks done

production not on master/ unhandled promise rejection #142

vsmart opened this issue Aug 13, 2018 · 4 comments

Comments

@vsmart
Copy link
Contributor

vsmart commented Aug 13, 2018

While running out the eng standards inventory (#141) I noticed that latest master is not deployed to production. production is still on 112e8ae0.

I started the update and it failed - no healthy tasks could start up because of this error:

(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: maxJobDuration: not a number

next steps

  • what introduced this regression?
  • deploy a safe fix

cc @mapbox/assembly-line

@vsmart
Copy link
Contributor Author

vsmart commented Aug 13, 2018

notes: I can see that the maxJobDuration was added to ecs-watchbot in mapbox/ecs-watchbot#230.
However, it looks like this is still running on 4.0.0 since #130 so I'm not sure where this issue comes from.

I can reproduce this issue by deploying the current master branch to staging.

@vsmart
Copy link
Contributor Author

vsmart commented Aug 13, 2018

💡 I think I tracked down the issue here.

npm i @mapbox/watchbot^4.0.0, which is run in the Dockerfile, installs watchbot 4.10.0 inside the container. any version of watchbot > 4.5.0 requires the maxJobDuration env variable.

but: the template itself is locked from package-lock.json at watchbot 4.2.0, so the template does not expose this env variable.

deploying #134 will fix this, since it upgrades the locked version of watchbot to 4.10.0 (i.e. above 4.5.0). I've verified this in staging.

for the future, we should also lock the version in the Dockerfile, and consider a way to make sure these too are the same and there are no conflicts.

@rclark
Copy link
Contributor

rclark commented Aug 13, 2018

We should follow ecs-watchbot's installation recommendation and install a prebuilt binary instead of running npm install in the Dockerfile.

@vsmart
Copy link
Contributor Author

vsmart commented Aug 20, 2018

👍 @rclark, the binary installation recommendation makes sense. However, I just ran into the same issue over at ecs-telephone, which is already using the binary version. The binary install in the Dockerfile was grabbing a newer version than the one in package.json. on startup the tasks crash with maxJobDuration is not a number.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants