Closed AartiJogiya closed 3 years ago
Hi @AartiJogiya. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues 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 issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Lima. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @AartiJogiya
We tried to reproduce the issue on 2.4-develop but were not able to do it.
Here is what we did:
So, in order to reproduce this on 2.4-develop, can you please check the above steps and let us know if you did things any differently or perhaps you can provide extra details for us to reproduce ?
Closing this issue as there has been no update from the reporter on the same.
@engcom-Lima: I think the issue does exist, I've seen it happening with other modules as well.
Therefore, could you please try the following instead of what you tried before:
core_config_data
table as was explained in the OP:
config.php
file or running bin/magento module:disable ...
)cron_schedule
table, it should not get new entries for those two analytics cronjobs after the module was disabled.This exists definitely in 2.3 it seem in 2.4 too
@engcom-Lima: could you please try this again with the steps mentioned above? Thanks! :)
Description (*)
Magento_Analytics module has two cron jobs as mentioned below-
Configurations defined in crontab.xml are as below:
Job name: analytics_subscribe Instance - "Magento\Analytics\Cron\SignUp" Method- "execute"
Job name: analytics_collect_data Instance - "Magento\Analytics\Cron\CollectData" Method- "execute"
Cron expressions are stored in core_config_data table as mentioned below:
When Magento_Analytics module is disabled, It will not get instance and method from crontab.xml but having cron expression stored in core_config_data table so Magento_Cron module is scheduling cron jobs which returns “No callbacks found for cron job” error when job runs Here if a module is disabled then it should not schedule any jobs of that module.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Workaround
Magento_Cron module is generating cron schedules by preparing an array object having job-name, instance, method and scheduleby following below process:
Reads crontab.xml file from all the enabled module and creates one array which will have job name, instance and method.
Reads the database and fetches cron expression stored in core_config_data table and it creates array having job name and schedule.
These two arrays are getting merged using array_replace_recursive function which creates an array object and generates schedules to cron_schedules table.
Here, Magento_Analytics module is disabled so it will not get the first array having instance and method from crontab.xml. So it will only get second array having a job name and schedule from database and it generates cron schedule even if it doesn't have instance and method and therefore returns error "No callbacks found for cron job" from file: magento/module-cron/Observer/ProcessCronQueueObserver.php (function name- _runJob).
If module is disabled and not getting instance and method for cron job then it should not generate cron array object which will prevent scheduling job.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.