-
Notifications
You must be signed in to change notification settings - Fork 181
Use juggler@3 for running tests #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@superkhau / @bajtos PTAL CI is failing as Postgres is not working on any of the environments. Have pinged @rmg and he's taking a look. It looks like its been broken since a week ago. |
I'm pretty sure I've tracked down the problem. I'll be deploying a fix soon (within a few hours, hopefully). |
cis-jenkins builds are now working - and failing on node 0.10 due to |
@0candy We can take care of this one, ping me on slack if you run into any issues. |
@rmg I think postgres is down on the windows machine. |
ea82b36
to
af338a2
Compare
Had to fix a couple issues with the Windows environments. Will hopefully work on the next build. @slnode test please |
@@ -15,6 +15,11 @@ var ParameterizedSQL = SqlConnector.ParameterizedSQL; | |||
var util = require('util'); | |||
var debug = require('debug')('loopback:connector:postgresql'); | |||
|
|||
// Add support for node 0.10.x | |||
if (typeof Promise == 'undefined') { | |||
global.Promise = require('promise-polyfill'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use bluebird
instead of promise-polyfill
. I am proposing to use bluebird
here too, for the sake of consistency.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually weird.
In version 3.0, we always use bluebird as our promise library instead of
global.Promise
. We consider Bluebird API a part of LoopBack API from now on, you are welcome to use any Bluebird-specific methods in your applications.
When using juggler@3, it should not be needed to patch global.Promise
. Unless there is a rouge test in juggler that uses global.Promise
instead of require('bluebird')
, in which case we need to make the fix in juggler.
@superkhau @0candy could you PTAL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cis-jenkins builds are now working - and failing on node 0.10 due to Promise not being defined.
I was looking into it and pg
uses pg-pool
which states this:
https://www.npmjs.com/package/pg-pool#bring-your-own-promise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using bluebird for v0.10, Promise is not defined because native promises (global.Promise) are not supported in v0.10.
1313d3b
to
c5bf1fa
Compare
test please |
@@ -15,6 +15,9 @@ var ParameterizedSQL = SqlConnector.ParameterizedSQL; | |||
var util = require('util'); | |||
var debug = require('debug')('loopback:connector:postgresql'); | |||
|
|||
// Add support for node 0.10.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
36e0e8f
to
66a5742
Compare
"eslint": "^2.13.1", | ||
"eslint-config-loopback": "^4.0.0", | ||
"loopback-datasource-juggler": "^2.28.0", | ||
"loopback-datasource-juggler": "^3.0.0-alpha.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpha.8
66a5742
to
8d76574
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge once CI is green! 🚢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is failing due to pg-pool using native promises. We need to inject a config to tell pg (and downstream) pg-pool to use bluebird as our promise lib. See https://github.com/brianc/node-postgres/blob/b1b2801c710d550f2b10910dfd49ad51bbf569fd/lib/pool-factory.js#L12
I think on https://github.com/strongloop/loopback-connector-postgresql/blob/master/lib/postgresql.js#L77, you can add |
8d76574
to
d8b4ba7
Compare
d8b4ba7
to
0703de5
Compare
Nice, I like the final version 👍 |
Connect to https://github.com/strongloop-internal/scrum-loopback/issues/1040