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

Wait for cron process to finish properly #904

Merged

Conversation

fredden
Copy link
Member

@fredden fredden commented May 30, 2023

Description

When running bin/magento cron:run, several background processes are spawned. The intent of the <magentoCron /> XML node is to run certain cron groups to completion. However, as the actual processing may happen in a background process, the test-suite typically does not behave as expected. (This is a race condition; see magento/magento2#37511 for further details.)

This pull request solves this race condition by using the internal 'bootstrap' argument to indicate that the cron process is already standalone. This means that no additional background processes will be run and the jobs complete in the foreground process. The test-suite will then wait for this process to terminate before proceeding. This is the desired behaviour.

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/verification tests (if applicable)
  • All automated tests passed successfully (all builds are green)
  • Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests

@fredden
Copy link
Member Author

fredden commented Jun 1, 2023

Please don't let any test failures in magento/magento2#37511 block this pull request. It's stand-alone on purpose.

@KevinBKozan
Copy link
Contributor

@fredden Thank you for your contribution! We merged your commits in an internal PR after testing the functionality changes. This PR should automatically close once they are synced 👍

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 62f8573 into magento:develop Jun 15, 2023
@fredden fredden deleted the cron-wait-group branch June 15, 2023 16:48
@fredden
Copy link
Member Author

fredden commented Jun 16, 2023

@KevinBKozan thanks for the update. Do you know when a new release will be tagged which includes this change?

@KevinBKozan
Copy link
Contributor

@fredden I believe it should be very soon, a day or two at most. Internal PR to finalize the version was already merged so the new tag should be out soon!

@fredden
Copy link
Member Author

fredden commented Jun 20, 2023

I can see that version 4.3.2 has now been released which includes this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accept Partner: Youwe partners-contribution Pull Request is created by Magento Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants