Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #22240: Running cron jobs fails if database name is too long #25472

Merged
merged 3 commits into from Nov 24, 2019

Conversation

vpashovski
Copy link
Contributor

Description (*)

Create short name for Database Lock name.
Use same logic to generate name as Foreign keys if name is longer than 64 characters.

Fixed Issues (if relevant)

  1. Running cron jobs fails if database name is too long #22240: Running cron jobs fails if database name is too long

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)
  • All automated tests passed successfully (all builds are green)

Create short name for Database Lock name
@m2-assistant
Copy link

m2-assistant bot commented Nov 5, 2019

Hi @vpashovski. Thank you for your contribution
Here is 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.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

Fix Test to lock database with long name
@pmclain pmclain self-requested a review November 7, 2019 01:33
@pmclain pmclain self-assigned this Nov 7, 2019
@pmclain pmclain added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Nov 8, 2019
@engcom-Alfa engcom-Alfa self-assigned this Nov 11, 2019
@PascalBrouwers
Copy link
Contributor

🙏

@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Nov 11, 2019

Hi @vpashovski

I've checked PR changes and looks like all works correctly.
But we do not fully understand why to leave the check
if (strlen($name) > 64) { throw new InputException(new Phrase('Lock name too long: %1...', [substr($name, 0, 64)])); } if the $name value cannot be greater then 64 symbols.

Did I misunderstand something?

@vpashovski @pmclain Could you take a look?

Thanks!

@vpashovski
Copy link
Contributor Author

Hi @engcom-Alfa

I think you are right - the check is not necessary anymore. I will remove it and commit.

@PascalBrouwers
Copy link
Contributor

Looks good, go go go merge! :)

@magento-engcom-team
Copy link
Contributor

Hi @pmclain, thank you for the review.
ENGCOM-6253 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Before:
before

After:
after

@m2-assistant
Copy link

m2-assistant bot commented Nov 24, 2019

Hi @vpashovski, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.5 milestone Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Lock Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants