Repository navigation
fix(mysql): getVersion returning undefined for PolarDB-X 2.0 - #11837
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 4a5af2f
Previous suggestionsSuggestions up to commit ce144b8
|
||||||||||||||||||
|
When using the distributed database PolarDB-X 2.0 compatible with MYSQL 8.0,start a nestjs server will show a error:
|
commit: |
A test for PolarDB or for MySQL? |
pkuczynski
left a comment
There was a problem hiding this comment.
True, simple test would be useful...
|
I'm afraid that fixing the version return is not enough to make PolarDBX to work properly with TypeORM, after getting the version it fails at every test saying You can play around with their docker image and see yourself. (Here was a big message with logs from their container to demonstrate what I'm talking about but docker ate up all the RAM I had before I could send the comment) |
|
Before we go, @Missna can you please test the changes with your environment? I mean, with remote PolarDBX that you are using. You can install the PR as described here: #11837 (comment) If that's enough to make PolarDBX working, then I'll try to figure out a test for this PR. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
@OSA413 I would just merge this PR, I don't understand why we requested changes given the fact we have a lot of mysql tests for all these features that are version-specific. I think this change was anyway what I requested in the PR that fixed the Alibaba-managed MySQL 5.7 (but wasn't implemented and I did not want to insist). Specifying a column alias is more specific, so it's good to have it, especially since we have experience with MySQL misbehaving. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
We already have tests. We don't want to add a new test suite for this obscure version.
No tests needed according to @alumni
|
Thanks for the contribution and thanks for merging :) |
@OSA413 Yes, I have already used it in my project. Before the update, I made modifications using the patch function of pnpm, and it is currently running well |
|
BTW, Alibaba's versions of MySQL are known to do crazy things, see also #11553 (PR #11555). We used to have I think we can't handle and we can't test all possible custom versions of MySQL out there - especially since Alibaba has a habit of not updating things for a while (experienced the same with Redis while working on their cloud), they don't even release patch updates. In general, I would report such bugs to Alibaba's services as their behavior is not standard, all we can do here is to make workarounds. I think the problem with version will be better worked around once we pass a manual override during connection options - this will also allow to improve serverless performance. |
|
/compliance |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||||||
Description of change
Pull-Request Checklist
masterbranchtests/**.test.ts)docs/docs/**.md)