Repository navigation
Conversation
… of connecting is used
fixing issues with connector and tests
Signed-off-by: Mark Irish <[email protected]>
Signed-off-by: Mark Irish <[email protected]>
Signed-off-by: Mark Irish <[email protected]>
Signed-off-by: Mark Irish <[email protected]>
|
Hey Mark, I'll get back to you throughout the week :) |
|
I had a super rough look through the changes and in general I'd be happy to merge this. However, we would need a well working CI pipeline for this first. Could there be any docker image to be used for that purpose? Please ping me on slack if you think that would be quicker @markdirish |
|
Awesome! Unfortunately there is no Docker container for IBM i. We do have a CI system for Node.js that we can use for the Node.js ecosystem as well. I will set up an account that the project can use to run tests. I will also spend a day or two polishing everything up (making sure the lint checks pass, seeing if I can fix those 9 tests or at least skip them, etc). and then ping here or on Slack. |
|
We are going to have our monthly sequelize sync tomorrow and will discuss the matter of how to deal with dialect support requests there: https://www.meetup.com/eBay-Europe-Technology/events/282125063/ Feel free to drop by and participate in the discussion. |
|
Thanks @sdepold, would love to stop by. I am still working on getting a CI system working for the dialect. I think I will also need a docker container (or a GitHub Actions workflow) setup to create a Linux system that has unixodbc installed, Node.js installed, the |
|
How is it going with this PR? |
|
I will look through the tests again tomorrow, but if I remember correctly, I think around 7 of the failures can be ignored, and then there were only 1 or 2 that actually needed attention. The CI/CD system is going to be a thorn, I'm not sure the best way to approach it. The public IBM i system I was hoping to use is so slow as to be useless: It was taking over 8 hours to run the entire suite of integration tests, with some individual tests taking 5-10 minutes. For now, I can run new merges/PRs against the private development systems I have access to, but we will definitely need a better long term solution. I will continue to investigate. I have begun to look at TypeScript-ifying the dialect, but only at a very cursory level. It is impossible to implement an interface or extend an abstract class if I don't have those units in hand. I know someone said they were going to take a look at typing the abstract query generator, but I am going to start in earnest on the rest of the |
|
For the integration smoke test we discussed during today's meeting you might want to look at the one that was made for Snowflake; https://github.com/sequelize/sequelize/blob/main/test/integration/dialects/snowflake/smoke.test.js |
|
Is this actually executed? |
The Snowflake smoke test? I think the Snowflake team runs it manually, but we don't do it as part of CI. But we can do that for this |
|
Closing and opening a new PR. Merging from a different branch, with a slightly different history. |
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
Hi there! My name is Mark Irish, and I'm an IBMer who works on open-source software on one of business systems, IBM i.
This PR implements an
ibmidialect, which connects to and generates queries for Db2 for i (the internal database at the heart of IBM i). This dialect has been a long time coming, and is spun-off of/part of this issue: #6263For the last few years, I have published this dialect (and the rest of sequelize) as a standalone package called
sequelize-ibmi. I am willing to keep this package as a separate effort, but I thought it would be nice to include the dialect in the base package and support it from there.I have tried very hard to touch any files outside of
lib/dialects/ibmi/andtests/as little as possible. Nonetheless, there are some dialect-specific code paths in the main sequelize code base, and I have includedibmichecks where appropriate.As of the current commit when this PR was created, there are only 9 integration tests that fail (out of 1500+). They deal with all sorts of various edge cases, things like complex multiple OUTER JOIN statements, or the tests assuming that the connection is an EventEmitter. Nonetheless, I am confident that 98%+ of functionality works smoothly with the included dialect.
Currently I don't have a good CI/CD public IBM i system set up to run builds against: IBM is reluctant to provide a public box, but there are community systems that may prove useful once I have cleared the use with the owners. Tests will then connect remotely to that system to run unit and integration tests.
Anyways, I know that adopting an entire new dialect is a big undertaking, but I thought I would create the PR here (and keep it updated) to facilitate discussion and to show package parity with
sequelize-ibmi.Let me know what you think!