Skip to content

Upgrade MariaDB connector to v3 #14379

Closed

Description

@WikiRik

Issue Creation Checklist

Issue Description

We want to merge #15011 later, but some tests are failing.

  1) [MARIADB] DataTypes
       calls parse and stringify for INTEGER:
     AssertionError: expected spy to have been called at least once, but it was never called
      at Assertion.<anonymous> (node_modules/sinon-chai/lib/sinon-chai.js:83:18)
      at Assertion.propertyGetter (node_modules/chai/lib/chai/utils/addProperty.js:62:29)
      at Object.proxyGetter [as get] (node_modules/chai/lib/chai/utils/proxify.js:98:22)
      at testSuccess (test/integration/data-types.test.js:92:31)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Context.<anonymous> (test/integration/data-types.test.js:211:5)

  2) [MARIADB] DataTypes
       calls parse and stringify for BIGINT:
     AssertionError: expected spy to have been called at least once, but it was never called
      at Assertion.<anonymous> (node_modules/sinon-chai/lib/sinon-chai.js:83:18)
      at Assertion.propertyGetter (node_modules/chai/lib/chai/utils/addProperty.js:62:29)
      at Object.proxyGetter [as get] (node_modules/chai/lib/chai/utils/proxify.js:98:22)
      at testSuccess (test/integration/data-types.test.js:92:31)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Context.<anonymous> (test/integration/data-types.test.js:227:7)

  3) [MARIADB] Pooling
       network / connection errors
         should obtain new connection when old connection is abruptly closed:
     TypeError: connection.emit is not a function
      at simulateUnexpectedError (test/integration/pool.test.js:99:22)
      at Context.<anonymous> (test/integration/pool.test.js:110:7)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

Issue Template Checklist

Is this issue dialect-specific?

  • Yes. This issue only applies to the following dialect(s): MariaDB

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.

Activity

  1. added
    dialect: mariadb
    type: other
    on Apr 13, 2022
  2. WikiRik commented on Sep 18, 2022

    @WikiRik
    MemberAuthor

    @ephys since two of the failing tests are connected to DataTypes I think we should wait with making the fixes to upgrade this until after we merged #14505

  3. WikiRik commented on Nov 20, 2022

    @WikiRik
    MemberAuthor

    Upgrading to 3.0.2 now causes the following failed tests;

    1) DataTypes
           BIGINT
             is deserialized as a string when DataType is not specified:
         AssertionError: expected 123 to deeply equal '123'
          at Proxy.assertEql (node_modules/chai/lib/chai/core/assertions.js:1096:10)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1035:12)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at testSimpleInOutRaw (test/integration/data-types/data-types.test.ts:1674:49)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
          at Context.<anonymous> (test/integration/data-types/data-types.test.ts:668:9)
    
      2) [MARIADB] Model
           constructor
             should allow the user to specify indexes in options:
    
          AssertionError: expected [ { attribute: 'fieldB', …(2) }, …(1) ] to deeply equal [ { attribute: 'fieldB', …(2) }, …(1) ]
          + expected - actual
    
               "order": "ASC"
             }
             {
               "attribute": "fieldA"
          -    "length": 5
          +    "length": "5"
               "order": "ASC"
             }
           ]
          
          at Proxy.assertEql (node_modules/chai/lib/chai/core/assertions.js:1096:10)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1035:12)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at Context.<anonymous> (test/integration/model.test.js:589:39)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
    
      3) [MARIADB] Model.sync & Sequelize#sync
           adds missing non-unique indexes to existing tables (index option):
    
          index should not be unique
          + expected - actual
    
          -true
          +false
          
          at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1038:12)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at Context.<anonymous> (test/integration/model/sync.test.js:394:31)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
    
      4) [MARIADB] Pooling
           network / connection errors
             should obtain new connection when old connection is abruptly closed:
         TypeError: connection.emit is not a function
          at simulateUnexpectedError (test/integration/pool.test.ts:112:22)
          at Context.<anonymous> (test/integration/pool.test.ts:123:13)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
    
      5) [MARIADB] fn()
           accepts condition object (with cast):
         AssertionError: expected 3 to equal '3'
          at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1038:12)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at Context.<anonymous> (test/integration/utils.test.ts:59:40)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
    
      6) [MARIADB] fn()
           accepts condition object (auto casting):
         AssertionError: expected 3 to equal '3'
          at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1038:12)
          at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
          at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
          at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
          at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
          at Context.<anonymous> (test/integration/utils.test.ts:87:40)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
    
  4. ephys commented on Nov 20, 2022

    @ephys
    Member

    All errors except one are caused by MariaDB returning JS BigInts instead of strings by default for bigints. It's a good change but we should provide a way to opt back to using strings for backward compatibility before we use bigints everywhere by default (task #14296)

    In the meantime we can make mariadb return strings for bigints

  5. WikiRik commented on Apr 9, 2023

    @WikiRik
    MemberAuthor

    Linking #15311 here so we don't forget about it

  6. moved this to Before v7 in Roadmapon Apr 9, 2023
  7. moved this from Before v7 to Doing (v7) in Roadmapon Jun 17, 2023
  8. moved this from Doing (v7) to Done in Roadmapon Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dialect: mariadbtype: other

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions