magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

fix for #38585: Signed primary columns changed value

Open KrasnoshchokBohdan opened this issue 1 year ago • 48 comments

Description (*)

changed "unsigned" attribute for "value_id" column for tables from original list (This is applicable to the following tables:... from author post) + catalog_category_entity_datetime, customer_address_entity_datetime

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#38585

Manual testing scenarios (*)

  1. mysql -u root -p
  2. use (your magento2 db name)
  3. desc catalog_product_entity_text (or any table from the list)
  4. check "value_id" type, should be unsigned image

Questions or comments

Contribution checklist (*)

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

KrasnoshchokBohdan avatar Jul 12 '24 08:07 KrasnoshchokBohdan

Hi @KrasnoshchokBohdan. Thank you for your contribution! Here are some useful tips on 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 Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.

m2-assistant[bot] avatar Jul 12 '24 08:07 m2-assistant[bot]

@magento run all tests

KrasnoshchokBohdan avatar Jul 12 '24 08:07 KrasnoshchokBohdan

@magento run Functional Tests B2B Functional Tests CE Functional Tests EE

KrasnoshchokBohdan avatar Jul 12 '24 12:07 KrasnoshchokBohdan

Failed to run the builds. Please try to re-run them later.

@magento run Functional Tests B2B

KrasnoshchokBohdan avatar Jul 12 '24 13:07 KrasnoshchokBohdan

@magento run Functional Tests B2B

KrasnoshchokBohdan avatar Jul 15 '24 06:07 KrasnoshchokBohdan

@magento run Functional Tests CE

KrasnoshchokBohdan avatar Jul 15 '24 09:07 KrasnoshchokBohdan

@magento run Functional Tests EE

KrasnoshchokBohdan avatar Jul 15 '24 12:07 KrasnoshchokBohdan

Failed tests seems flaky to me

KrasnoshchokBohdan avatar Jul 15 '24 17:07 KrasnoshchokBohdan

@magento run all tests

engcom-Hotel avatar Jul 23 '24 06:07 engcom-Hotel

We are moving this PR On Hold as some internal discussion is going on related to it.

engcom-Hotel avatar Jul 24 '24 14:07 engcom-Hotel

@magento run all tests

engcom-Hotel avatar Sep 10 '24 06:09 engcom-Hotel

@magento run all tests

engcom-Bravo avatar Sep 11 '24 06:09 engcom-Bravo

Hi @KrasnoshchokBohdan,

Thanks for the collaboration & contribution!

:heavy_check_mark: QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Steps to reproduce

  • mysql -u root -p
  • use (your magento2 db name)
  • desc catalog_product_entity_text (or any table from the list)
  • check "value_id" type, should be unsigned

Before: :heavy_multiplication_x: 

Screenshot 2024-09-11 at 11 30 08

After: :heavy_check_mark:

Screenshot 2024-09-11 at 14 34 59

Builds are failed. Hence, moving this PR to Extended Testing.

Thanks

engcom-Bravo avatar Sep 11 '24 11:09 engcom-Bravo

@magento run all tests

engcom-Charlie avatar Sep 12 '24 07:09 engcom-Charlie

The functional B2B failures are not same in 2 recent builds on same code. The failing tests are not failing because of PR changes, seems to be flaky. Hence moving this PR to Merge in Progress.

Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38920/fb2f4094d46ade96a80c9e3c3b13d81e/Functional/allure-report-b2b/index.html

image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38920/aa6286563162120e7ba890719aa5fb99/Functional/allure-report-b2b/index.html#categories/9d8166a0c03ff30be1e72531365d31ec/45b8b3964c62d0b0/ image

engcom-Charlie avatar Sep 12 '24 10:09 engcom-Charlie

@KrasnoshchokBohdan @engcom-Hotel Changes look good to me, but just wondering if we should update all such values at once? https://github.com/search?q=repo%3Amagento%2Fmagento2+unsigned%3D%22false%22+path%3A*.xml&type=code

ihor-sviziev avatar Sep 12 '24 10:09 ihor-sviziev

@ihor-sviziev I can't think of any reasons why it would be better to split it up

KrasnoshchokBohdan avatar Sep 12 '24 10:09 KrasnoshchokBohdan

@ihor-sviziev but this is all i found https://github.com/search?q=repo%3Amagento%2Fmagento2+unsigned%3D%22false%22+path%3A*.xml&type=code

or, maybe, I misunderstand you, please add additional information

KrasnoshchokBohdan avatar Sep 12 '24 21:09 KrasnoshchokBohdan

@KrasnoshchokBohdan that's the list that I found:

  • https://github.com/magento/magento2/blob/ea3216321185052523ad65728ee97a53fb8bdb86/app/code/Magento/Cms/etc/db_schema.xml#L11
  • https://github.com/magento/magento2/blob/ea3216321185052523ad65728ee97a53fb8bdb86/app/code/Magento/Tax/etc/db_schema.xml#L21
  • https://github.com/magento/magento2/blob/ea3216321185052523ad65728ee97a53fb8bdb86/app/code/Magento/LoginAsCustomerLog/etc/db_schema.xml#L10 Could you please check?

ihor-sviziev avatar Sep 13 '24 15:09 ihor-sviziev

@magento run all tests

KrasnoshchokBohdan avatar Sep 14 '24 22:09 KrasnoshchokBohdan

@ihor-sviziev thank you! I hope I understood your point

if we check the original issue description, we will see that author has pointed to the primary columns with name "value_id", so I focused on them, my bad.

I would also like to note that the search in php-storm does not work 100% correctly, I tried to check carefully, but I am afraid that I might have missed some files, so please let me know if there are any - I fix it

KrasnoshchokBohdan avatar Sep 14 '24 22:09 KrasnoshchokBohdan

@KrasnoshchokBohdan, could you check test failures? https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38920/a958c94246b4436e20c0578b455ffce8/Integration/console-error-logs.html It might be not a good idea to fix it inall places

ihor-sviziev avatar Sep 16 '24 08:09 ihor-sviziev

Hi @KrasnoshchokBohdan,

Thank you for your contribution!

The PR have been moved to Merge in Progress after approval, testing and build stabilization but @KrasnoshchokBohdan, as you are started modifying the code base, moving this PR back to Changes Requested again.

Please let us know once you are completed the development on it.

Thank you!

engcom-Charlie avatar Sep 16 '24 08:09 engcom-Charlie

@magento run all tests

KrasnoshchokBohdan avatar Sep 17 '24 15:09 KrasnoshchokBohdan

@magento run Integration Tests

KrasnoshchokBohdan avatar Sep 17 '24 19:09 KrasnoshchokBohdan

@magento run Database Compare

KrasnoshchokBohdan avatar Sep 17 '24 21:09 KrasnoshchokBohdan

@magento run Unit Tests Static Tests WebAPI Tests

KrasnoshchokBohdan avatar Sep 18 '24 06:09 KrasnoshchokBohdan

Failed to run the builds. Please try to re-run them later.

@magento run Unit Tests

KrasnoshchokBohdan avatar Sep 18 '24 06:09 KrasnoshchokBohdan