magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Set default collation to utf8mb4

Open sippsolutions opened this issue 2 years ago • 72 comments

Description (*)

MySQL 8 interprets utf8 as utf8mb3, which is deprecated: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8mb3.html We should therefor ensure utf8mb4 is used.

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All new or changed code is covered with unit/integration tests (if applicable)
  • [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [x] All automated tests passed successfully (all builds are green)

Resolved issues:

  1. [x] resolves magento/magento2#38085: Set default collation to utf8mb4

sippsolutions avatar Mar 10 '22 10:03 sippsolutions

Hi @sippsolutions. Thank you for your contribution Here are some useful tips how you can test your changes using Magento test environment. Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

:exclamation: Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s) For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

:information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

:warning: According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Mar 10 '22 10:03 m2-assistant[bot]

@magento run all tests

sippsolutions avatar Mar 10 '22 10:03 sippsolutions

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

Hi @sippsolutions Thanks for this PR. Could you please fix failed tests

Den4ik avatar Mar 17 '22 15:03 Den4ik

@Den4ik did you see my changes? the tests are intended to fail.

sippsolutions avatar May 22 '22 20:05 sippsolutions

Hi @sippsolutions Sorry for delay. I don't see any commits after my message. Unit and Static tests failed on changed file

Den4ik avatar May 24 '22 09:05 Den4ik

Hi @Den4ik, the failing database compare tests cannot be fixed as they state that there are differences in the database structure. If you look at the changes I made you can see that I changed the default collation for database tables. It is intended that the database structure differs.

sippsolutions avatar May 25 '22 07:05 sippsolutions

Hi @sippsolutions I didn't say about db tests. Only static and unit tests failed for changed file. I believe that some one from core team could help with this fixes off you don't have time for fix that

Den4ik avatar May 25 '22 07:05 Den4ik

@Den4ik that would be awesome :)

sippsolutions avatar Jun 13 '22 11:06 sippsolutions

@sippsolutions Could you resolve merge conflict?

Den4ik avatar Sep 12 '22 23:09 Den4ik

This might be a bit more complex than what it sounds like.

See https://github.com/OpenMage/magento-lts/pull/1036 where an attempt is made to apply a similar change to Magento 1, it contains a bunch of interesting information in the comments.

hostep avatar Sep 14 '22 19:09 hostep

https://github.com/magento/magento2/blob/0a834cce01c3d924d450c9a71123d9ac6de68b62/lib/internal/Magento/Framework/DB/Ddl/Table.php#L238

Would also need changes, otherwise you'll get mismatched collations which will kill your performance.

Quazz avatar Aug 08 '23 10:08 Quazz

@magento create issue

engcom-Hotel avatar Oct 16 '23 06:10 engcom-Hotel

Hello @sippsolutions,

Have you got chance to check this comment?

Thanks

engcom-Hotel avatar Oct 25 '23 09:10 engcom-Hotel

@engcom-Hotel done

sippsolutions avatar Oct 30 '23 12:10 sippsolutions

@magento give me 2.4-develop instance

engcom-Hotel avatar Oct 31 '23 17:10 engcom-Hotel

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

@magento run all tests

engcom-Hotel avatar Oct 31 '23 17:10 engcom-Hotel

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Hi @engcom-Hotel, here is your Magento Instance: https://1585e9346595e3e0dd79a319424609d3.instances-prod.magento-community.engineering Admin access: https://1585e9346595e3e0dd79a319424609d3.instances-prod.magento-community.engineering/admin_6ce8 Login: dff2fd59 Password: b848b4a57bed

@sippsolutions we are picking up this PR for fixes.

engcom-Hotel avatar Nov 07 '23 07:11 engcom-Hotel

@magento run Integration Tests

engcom-Hotel avatar Nov 07 '23 09:11 engcom-Hotel

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@magento run Integration Tests

engcom-Hotel avatar Nov 07 '23 10:11 engcom-Hotel

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@magento run Integration Tests

engcom-Hotel avatar Nov 07 '23 13:11 engcom-Hotel

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@magento run Integration Tests

engcom-Hotel avatar Nov 08 '23 06:11 engcom-Hotel

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@magento run Integration Tests

engcom-Hotel avatar Nov 13 '23 09:11 engcom-Hotel