Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Bluebird.try #3263

Merged
merged 6 commits into from Jun 7, 2019
Merged

Remove Bluebird.try #3263

merged 6 commits into from Jun 7, 2019

Conversation

chaffeqa
Copy link
Contributor

@chaffeqa chaffeqa commented Jun 7, 2019

Still waiting on oracle docker 馃檮 but think this is ok...

Should resolve #3253

@elhigu
Copy link
Member

elhigu commented Jun 7, 2019

Please check eslint, it fails on every environment.

@elhigu
Copy link
Member

elhigu commented Jun 7, 2019

  893 passing (5s)
  1 pending
  24 failing
  1) Query Building Tests
       knex
         passes queryContext to wrapIdentifier in raw query:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Context.it (test/unit/knex.js:203:8)
  2) Query Building Tests
       knex
         passes queryContext to wrapIdentifier in raw query in transaction:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Promise (src/transaction.js:188:44)
      at Transaction.acquireConnection (src/transaction.js:186:12)
      at new Transaction (src/transaction.js:44:12)
      at Client_SQLite3.transaction (src/client.js:114:12)
      at Function.transaction (src/util/make-knex.js:41:31)
      at Context.it (test/unit/knex.js:242:17)
  3) Query Building Tests
       knex
         transaction of a copy with userParams retains userparams:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Promise (src/transaction.js:188:44)
      at Transaction.acquireConnection (src/transaction.js:186:12)
      at new Transaction (src/transaction.js:44:12)
      at Client_SQLite3.transaction (src/client.js:114:12)
      at Function.transaction (src/util/make-knex.js:41:31)
      at Context.it (test/unit/knex.js:296:27)
  4) Query Building Tests
       knex
         propagates error correctly when all connections are in use:
     AssertionError: expected 'this.pool.acquire(...).promise is not a function' to include 'Timeout acquiring a connection'
      at knex.transaction.then.then.catch (test/unit/knex.js:316:32)
  From previous event:
      at Context.<anonymous> (test/unit/knex.js:315:13)
  5) Query Building Tests
       knex
         supports direct retrieval of a transaction from provider:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Promise (src/transaction.js:188:44)
      at Transaction.acquireConnection (src/transaction.js:186:12)
      at new Transaction (src/transaction.js:44:12)
      at Client_SQLite3.transaction (src/client.js:114:12)
      at Function.transaction (src/util/make-knex.js:41:31)
      at /home/travis/build/tgriesser/knex/src/util/make-knex.js:57:22
      at Context.it (test/unit/knex.js:323:24)
  6) Query Building Tests
       knex
         creating transaction copy with user params should throw an error:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Promise (src/transaction.js:188:44)
      at Transaction.acquireConnection (src/transaction.js:186:12)
      at new Transaction (src/transaction.js:44:12)
      at Client_SQLite3.transaction (src/client.js:114:12)
      at Function.transaction (src/util/make-knex.js:41:31)
      at Context.it (test/unit/knex.js:345:17)
  7) Query Building Tests
       knex
         async stack traces
           should capture stack trace on query builder instantiation:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Builder.Target.then (src/interface.js:14:43)
      at Builder.Target.(anonymous function) [as catch] (src/interface.js:106:30)
      at Context.it (test/unit/knex.js:385:15)
  8) Oracledb driver tests
       OracleDb parameters
         with fetchAsString parameter 
           on float:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_Oracledb.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.<anonymous> (test/unit/dialects/oracledb.js:59:10)
  9) Oracledb driver tests
       OracleDb parameters
         with fetchAsString parameter 
           on date:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_Oracledb.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.<anonymous> (test/unit/dialects/oracledb.js:68:10)
  10) Oracledb driver tests
       OracleDb parameters
         without fetchAsString parameter
           on float:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_Oracledb.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.<anonymous> (test/unit/dialects/oracledb.js:90:10)
  11) Oracledb driver tests
       OracleDb parameters
         without fetchAsString parameter
           on date:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_Oracledb.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.<anonymous> (test/unit/dialects/oracledb.js:99:10)
  12) Postgres Unit Tests
       does not resolve client version if specified explicitly:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_PG.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.it (test/unit/dialects/postgres.js:48:39)
  13) Postgres Unit Tests
       resolve client version if not specified explicitly:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_PG.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.it (test/unit/dialects/postgres.js:62:39)
  14) Postgres Unit Tests
       Uses documented query config as param when providing bindings:
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_PG.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at Raw.Target.then (src/interface.js:14:43)
      at Context.it (test/unit/dialects/postgres.js:115:48)
  15) CLI tests
       resolves knexfile correctly with cwd specified:
     node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --cwd=test/jake-util/knexfile --knexfile=knexfile.js -> FAIL. 
Stdout: Working directory changed to ~/build/tgriesser/knex/test/jake-util/knexfile
sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
 
Error: /home/travis/build/tgriesser/knex/src/client.js:310
      .promise()
       ^
TypeError: this.pool.acquire(...).promise is not a function
    at Client_SQLite3.acquireConnection (/home/travis/build/tgriesser/knex/src/client.js:310:8)
    at Runner.ensureConnection (/home/travis/build/tgriesser/knex/src/runner.js:246:8)
    at Runner.run (/home/travis/build/tgriesser/knex/src/runner.js:26:26)
    at SchemaBuilder.Target.then (/home/travis/build/tgriesser/knex/src/interface.js:14:43)
    at ensureTable (/home/travis/build/tgriesser/knex/src/migrate/table-creator.js:13:6)
    at listCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:13:10)
    at Object.listAllAndCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:32:5)
    at Migrator.latest (/home/travis/build/tgriesser/knex/src/migrate/Migrator.js:66:8)
    at Command.commander.command.description.option.action (/home/travis/build/tgriesser/knex/bin/cli.js:198:18)
    at Command.listener (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:651:12)
    at Command.parse (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:474:21)
    at Liftoff.invoke (/home/travis/build/tgriesser/knex/bin/cli.js:333:13)
    at Liftoff.execute (/home/travis/build/tgriesser/knex/node_modules/liftoff/index.js:201:12)
    at module.exports (/home/travis/build/tgriesser/knex/node_modules/flagged-respawn/index.js:51:3)
  Error: node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --cwd=test/jake-util/knexfile --knexfile=knexfile.js -> FAIL. 
  Stdout: Working directory changed to ~/build/tgriesser/knex/test/jake-util/knexfile
  sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
   
  Error: /home/travis/build/tgriesser/knex/src/client.js:310
        .promise()
         ^
  
  TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at ensureTable (src/migrate/table-creator.js:13:6)
      at listCompleted (src/migrate/migration-list-resolver.js:13:10)
      at Object.listAllAndCompleted (src/migrate/migration-list-resolver.js:32:5)
      at Migrator.latest (src/migrate/Migrator.js:66:8)
      at Command.commander.command.description.option.action (bin/cli.js:198:18)
      at Command.listener (node_modules/commander/index.js:315:8)
      at Command.parseArgs (node_modules/commander/index.js:651:12)
      at Command.parse (node_modules/commander/index.js:474:21)
      at Liftoff.invoke (bin/cli.js:333:13)
      at Liftoff.execute (node_modules/liftoff/index.js:201:12)
      at module.exports (node_modules/flagged-respawn/index.js:51:3)
  
      at Exec.<anonymous> (node_modules/cli-testlab/lib/execution-test-helper.ts:50:21)
      at ChildProcess.<anonymous> (node_modules/jake/lib/utils/index.js:227:20)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
  16) CLI tests
       knexfile resolution
         Run migrations with knexfile passed:
     node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --knexfile=test/jake-util/knexfile/knexfile.js --knexpath=../knex.js -> FAIL. 
Stdout: sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
 
Error: /home/travis/build/tgriesser/knex/src/client.js:310
      .promise()
       ^
TypeError: this.pool.acquire(...).promise is not a function
    at Client_SQLite3.acquireConnection (/home/travis/build/tgriesser/knex/src/client.js:310:8)
    at Runner.ensureConnection (/home/travis/build/tgriesser/knex/src/runner.js:246:8)
    at Runner.run (/home/travis/build/tgriesser/knex/src/runner.js:26:26)
    at SchemaBuilder.Target.then (/home/travis/build/tgriesser/knex/src/interface.js:14:43)
    at ensureTable (/home/travis/build/tgriesser/knex/src/migrate/table-creator.js:13:6)
    at listCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:13:10)
    at Object.listAllAndCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:32:5)
    at Migrator.latest (/home/travis/build/tgriesser/knex/src/migrate/Migrator.js:66:8)
    at Command.commander.command.description.option.action (/home/travis/build/tgriesser/knex/bin/cli.js:198:18)
    at Command.listener (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:651:12)
    at Command.parse (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:474:21)
    at Liftoff.invoke (/home/travis/build/tgriesser/knex/bin/cli.js:333:13)
    at Liftoff.execute (/home/travis/build/tgriesser/knex/node_modules/liftoff/index.js:201:12)
    at module.exports (/home/travis/build/tgriesser/knex/node_modules/flagged-respawn/index.js:51:3)
  Error: node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --knexfile=test/jake-util/knexfile/knexfile.js --knexpath=../knex.js -> FAIL. 
  Stdout: sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
   
  Error: /home/travis/build/tgriesser/knex/src/client.js:310
        .promise()
         ^
  
  TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at ensureTable (src/migrate/table-creator.js:13:6)
      at listCompleted (src/migrate/migration-list-resolver.js:13:10)
      at Object.listAllAndCompleted (src/migrate/migration-list-resolver.js:32:5)
      at Migrator.latest (src/migrate/Migrator.js:66:8)
      at Command.commander.command.description.option.action (bin/cli.js:198:18)
      at Command.listener (node_modules/commander/index.js:315:8)
      at Command.parseArgs (node_modules/commander/index.js:651:12)
      at Command.parse (node_modules/commander/index.js:474:21)
      at Liftoff.invoke (bin/cli.js:333:13)
      at Liftoff.execute (node_modules/liftoff/index.js:201:12)
      at module.exports (node_modules/flagged-respawn/index.js:51:3)
  
      at Exec.<anonymous> (node_modules/cli-testlab/lib/execution-test-helper.ts:50:21)
      at ChildProcess.<anonymous> (node_modules/jake/lib/utils/index.js:227:20)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
  17) CLI tests
       knexfile resolution
         Resolves migrations relatively to knexfile:
     node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --knexfile=test/jake-util/knexfile-relative/knexfile.js --knexpath=../knex.js -> FAIL. 
Stdout: sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
 
Error: /home/travis/build/tgriesser/knex/src/client.js:310
      .promise()
       ^
TypeError: this.pool.acquire(...).promise is not a function
    at Client_SQLite3.acquireConnection (/home/travis/build/tgriesser/knex/src/client.js:310:8)
    at Runner.ensureConnection (/home/travis/build/tgriesser/knex/src/runner.js:246:8)
    at Runner.run (/home/travis/build/tgriesser/knex/src/runner.js:26:26)
    at SchemaBuilder.Target.then (/home/travis/build/tgriesser/knex/src/interface.js:14:43)
    at ensureTable (/home/travis/build/tgriesser/knex/src/migrate/table-creator.js:13:6)
    at listCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:13:10)
    at Object.listAllAndCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:32:5)
    at Migrator.latest (/home/travis/build/tgriesser/knex/src/migrate/Migrator.js:66:8)
    at Command.commander.command.description.option.action (/home/travis/build/tgriesser/knex/bin/cli.js:198:18)
    at Command.listener (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:651:12)
    at Command.parse (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:474:21)
    at Liftoff.invoke (/home/travis/build/tgriesser/knex/bin/cli.js:333:13)
    at Liftoff.execute (/home/travis/build/tgriesser/knex/node_modules/liftoff/index.js:201:12)
    at module.exports (/home/travis/build/tgriesser/knex/node_modules/flagged-respawn/index.js:51:3)
  Error: node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --knexfile=test/jake-util/knexfile-relative/knexfile.js --knexpath=../knex.js -> FAIL. 
  Stdout: sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
   
  Error: /home/travis/build/tgriesser/knex/src/client.js:310
        .promise()
         ^
  
  TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at ensureTable (src/migrate/table-creator.js:13:6)
      at listCompleted (src/migrate/migration-list-resolver.js:13:10)
      at Object.listAllAndCompleted (src/migrate/migration-list-resolver.js:32:5)
      at Migrator.latest (src/migrate/Migrator.js:66:8)
      at Command.commander.command.description.option.action (bin/cli.js:198:18)
      at Command.listener (node_modules/commander/index.js:315:8)
      at Command.parseArgs (node_modules/commander/index.js:651:12)
      at Command.parse (node_modules/commander/index.js:474:21)
      at Liftoff.invoke (bin/cli.js:333:13)
      at Liftoff.execute (node_modules/liftoff/index.js:201:12)
      at module.exports (node_modules/flagged-respawn/index.js:51:3)
  
      at Exec.<anonymous> (node_modules/cli-testlab/lib/execution-test-helper.ts:50:21)
      at ChildProcess.<anonymous> (node_modules/jake/lib/utils/index.js:227:20)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
  18) CLI tests
       knexfile resolution
         Resolves default knexfile in working directory correctly:
     node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --knexpath=../knex.js -> FAIL. 
Stdout: sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
 
Error: /home/travis/build/tgriesser/knex/src/client.js:310
      .promise()
       ^
TypeError: this.pool.acquire(...).promise is not a function
    at Client_SQLite3.acquireConnection (/home/travis/build/tgriesser/knex/src/client.js:310:8)
    at Runner.ensureConnection (/home/travis/build/tgriesser/knex/src/runner.js:246:8)
    at Runner.run (/home/travis/build/tgriesser/knex/src/runner.js:26:26)
    at SchemaBuilder.Target.then (/home/travis/build/tgriesser/knex/src/interface.js:14:43)
    at ensureTable (/home/travis/build/tgriesser/knex/src/migrate/table-creator.js:13:6)
    at listCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:13:10)
    at Object.listAllAndCompleted (/home/travis/build/tgriesser/knex/src/migrate/migration-list-resolver.js:32:5)
    at Migrator.latest (/home/travis/build/tgriesser/knex/src/migrate/Migrator.js:66:8)
    at Command.commander.command.description.option.action (/home/travis/build/tgriesser/knex/bin/cli.js:198:18)
    at Command.listener (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:651:12)
    at Command.parse (/home/travis/build/tgriesser/knex/node_modules/commander/index.js:474:21)
    at Liftoff.invoke (/home/travis/build/tgriesser/knex/bin/cli.js:333:13)
    at Liftoff.execute (/home/travis/build/tgriesser/knex/node_modules/liftoff/index.js:201:12)
    at module.exports (/home/travis/build/tgriesser/knex/node_modules/flagged-respawn/index.js:51:3)
  Error: node /home/travis/build/tgriesser/knex/bin/cli.js migrate:latest --knexpath=../knex.js -> FAIL. 
  Stdout: sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).
   
  Error: /home/travis/build/tgriesser/knex/src/client.js:310
        .promise()
         ^
  
  TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at ensureTable (src/migrate/table-creator.js:13:6)
      at listCompleted (src/migrate/migration-list-resolver.js:13:10)
      at Object.listAllAndCompleted (src/migrate/migration-list-resolver.js:32:5)
      at Migrator.latest (src/migrate/Migrator.js:66:8)
      at Command.commander.command.description.option.action (bin/cli.js:198:18)
      at Command.listener (node_modules/commander/index.js:315:8)
      at Command.parseArgs (node_modules/commander/index.js:651:12)
      at Command.parse (node_modules/commander/index.js:474:21)
      at Liftoff.invoke (bin/cli.js:333:13)
      at Liftoff.execute (node_modules/liftoff/index.js:201:12)
      at module.exports (node_modules/flagged-respawn/index.js:51:3)
  
      at Exec.<anonymous> (node_modules/cli-testlab/lib/execution-test-helper.ts:50:21)
      at ChildProcess.<anonymous> (node_modules/jake/lib/utils/index.js:227:20)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
  19) oracle | oracledb
       "before all" hook for "#test number mssql should not allow unsafe bigint":
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_Oracledb.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Migrator.forceFreeMigrationsLock (src/migrate/Migrator.js:220:8)
      at Context.<anonymous> (test/integration/migrate/index.js:16:25)
  20) mssql | mssql
       "before all" hook for "#test number mssql should not allow unsafe bigint":
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_MSSQL.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Migrator.forceFreeMigrationsLock (src/migrate/Migrator.js:220:8)
      at Context.<anonymous> (test/integration/migrate/index.js:16:25)
  21) mysql | mysql
       "before all" hook for "#test number mssql should not allow unsafe bigint":
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_MySQL.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Migrator.forceFreeMigrationsLock (src/migrate/Migrator.js:220:8)
      at Context.<anonymous> (test/integration/migrate/index.js:16:25)
  22) mysql | mysql2
       "before all" hook for "#test number mssql should not allow unsafe bigint":
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_MySQL2.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Migrator.forceFreeMigrationsLock (src/migrate/Migrator.js:220:8)
      at Context.<anonymous> (test/integration/migrate/index.js:16:25)
  23) postgresql | pg
       "before all" hook for "#test number mssql should not allow unsafe bigint":
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_PG.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Migrator.forceFreeMigrationsLock (src/migrate/Migrator.js:220:8)
      at Context.<anonymous> (test/integration/migrate/index.js:16:25)
  24) sqlite3 | sqlite3
       "before all" hook for "#test number mssql should not allow unsafe bigint":
     TypeError: this.pool.acquire(...).promise is not a function
      at Client_SQLite3.acquireConnection (src/client.js:310:8)
      at Runner.ensureConnection (src/runner.js:246:8)
      at Runner.run (src/runner.js:26:26)
      at SchemaBuilder.Target.then (src/interface.js:14:43)
      at Migrator.forceFreeMigrationsLock (src/migrate/Migrator.js:220:8)
      at Context.<anonymous> (test/integration/migrate/index.js:16:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 24
npm ERR! knex@0.18.0-next1 test: `mocha --exit -t 10000 test/index.js && npm run test:tape && npm run test:cli`
npm ERR! Exit status 24
npm ERR! 
npm ERR! Failed at the knex@0.18.0-next1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2019-06-07T11_42_43_311Z-debug.log
The command "npm run ${TESTSCRIPT:-test}" exited with 24.
cache.2
store build cache

@elhigu
Copy link
Member

elhigu commented Jun 7, 2019

If you have docker installed, running tests is pretty straightforward also locally.

@chaffeqa
Copy link
Contributor Author

chaffeqa commented Jun 7, 2019

Yea i let oracle docker install overnight, but it seemed to fail, so I'm just running DB='postgres mysql' npm test currenlty and am seeing those errors now (FYI part of opening this PR was to try to see what the CI could expose since I was having issues running tests locally).

I'm currently trying to figure out the best way to get around the disposer pattern usage with acquireConnection. Will post here on ideas I come up with, but if you have any idea for how to help move off of Bluebird disposer patterns I'd love to hear!

@elhigu
Copy link
Member

elhigu commented Jun 7, 2019

Yea i let oracle docker install overnight, but it seemed to fail, so I'm just running DB='postgres mysql' npm test currenlty and am seeing those errors now (FYI part of opening this PR was to try to see what the CI could expose since I was having issues running tests locally).

You could just start all other databases except oracle and run tests with something like:

DB="mssql mysql mysql2 postgres sqlite3" npm run test

I'm currently trying to figure out the best way to get around the disposer pattern usage with acquireConnection. Will post here on ideas I come up with, but if you have any idea for how to help move off of Bluebird disposer patterns I'd love to hear!

Yea... that sounds like a quite non trivial to do and pretty crucial when making sure that pooling stuff is not leaked. I haven't really though about how to solve that in a robust manner.

@chaffeqa
Copy link
Contributor Author

chaffeqa commented Jun 7, 2019

Ok so that one try that is still in there is to make sure the chain is Disposible... I'm going to think about a solution for this disposer pattern issue.

FYI everything passes locally except for the 2 tests that were failing on master for me as well... don't know if that seems to be an issue

scripts/build.js Outdated
return exec('npm install ' + installArgs, opts);
}
})
var needsDepInstallation = !_.isEmpty(installArgs);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these need to be var? can they be const?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Was not sure what files are transpiled and which ones weren't, so I adhered to whatever the current file used (const if it had const or let, otherwise var)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe nothing is transpiled anymore, both babel and support for node 6 were dropped.

@chaffeqa
Copy link
Contributor Author

chaffeqa commented Jun 7, 2019

Ok just to continue the thoughts from the start of the thread, I think it makes sense to keep this PR just targetting the .try usages, with exception of the one that is required since it allows the chain to have access to the .dispose functionality.

I think what i'd like to propose in a separate PR is some way to implement the Disposer pattern outside of bluebird, which is a very important piece we will need to implement.

Thoughts?

@kibertoad
Copy link
Collaborator

@chaffeqa Makes sense! Let's do this as incrementally as possible.

@kibertoad kibertoad merged commit ab6a304 into knex:master Jun 7, 2019
@chaffeqa chaffeqa deleted the task/remove-try branch June 8, 2019 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bluebird] Remove Promise.try usage
3 participants