Closed onlinebizsoft closed 1 year ago
Hi @onlinebizsoft. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@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, join the Community Contributions Triage session to discuss the appropriate ticket.
Do you have any idea about this behavior? @hostep @ihor-sviziev
@onlinebizsoft I think it's designed like that because expecting this command to be executed during deployment. And when you deploy a new build, you probably might deploy some new module, new magento version, new css or js. And after the deployment you expect to see the change you deployed. I do agree that not all changes require varnish cache invalidation, but developing mechanism that will decide if we need to flush cache or no - pretty hard. From my perspective, we should keep such behavior as expected
@ihor-sviziev but purging varnish can be done at very last step because after upgrading DB we will have di compile and deploy static steps which can take few hours for a system with so many languages (even ran multiple processes for deploying static). And the strange thing is that Magento clear varnish at that time but after finishing whole the deployment processes, we still have to clear varnish again. So what is the point doing it twice?
@onlinebizsoft for production environment it should be the last step. Here are the docs how it should be https://devdocs.magento.com/guides/v2.3/config-guide/deployment/pipeline/technical-details.html#config-deploy-workflow
@onlinebizsoft: Ihor is correct, setup:upgrade
(preferably with the --keep-generated
flag) should be one of the last steps of the deployment process, setup:di:compile
and setup:static-content:deploy
should happen before that.
And it's expected to flush the entire cache.
... and deploy static steps which can take few hours for a system with so many languages (even ran multiple processes for deploying static).
Multiple hours? That must surely mean there is something wrong, because that's insane. The longest deploy we have with a project takes 11 minutes and deploys 14 languages using 3 parallel jobs. You might be running against this bug, which was solved by https://github.com/magento/magento2/search?q=ACP2E-1168&type=commits
@hostep our project has more than 60 languages so it took quite some time. I will look at deployment steps again, look like we shouldnt run upgrade before static.
Hi @engcom-November. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @onlinebizsoft , We are closing this issue as there has been no latest update on the same. Kindly reopen / create new issue if you are still facing issues. Thank you.
@engcom-November what do you mean by "no latest update on the same" ? Please re-open, this issue is still valid
Hi @engcom-Dash. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Hi @onlinebizsoft ,
Verified the issue in 2.4-develop instance and the issue is not reproducible.
Steps to reproduce: 1.Install magento instance 2.Run Setup Upgrade command 3.Validate cached pages in varnish as per Devedocs
Kindly refer the below screenshots:
After upgrading cached pages stay in varnish only.
Let us know if we are missing anything!
@engcom-Dash: there's no good reason to put time in this issue.
@onlinebizsoft : I'm afraid Magento is designed like this to flush all caches each time bin/magento setup:upgrade
runs, I don't think it's a good idea to attempt to change that, as it would probably break thousands of different workflows people are now used to use.
If it doesn't work in your workflow, then try to change your own workflow to make it work. Like Ihor said, you should run it almost at the very end of the deploy.
In my opinion this ticket should be closed again.
@hostep yes, I do agree that upgrade should be done at the last step however sometime we may deploy some new backend modules,....which should run upgrade DB but shouldn't touch Varnish. Automatic detection can be hard but maybe we should provide an option to flush Varnish or not when we run upgrade DB so the deployment pipeline can decide which strategy they want
@onlinebizsoft I think it's not so important to provide such a feature out of the box since it would be needed for small percent of shops. If needed, you always could implement it in your custom extension or apply your custom patch
Hi @onlinebizsoft ,
As per @hostep Comments ,We are closing the issue for now. Please feel free to reopen it or ask us to reopen.
Thanks!
Preconditions and environment
Steps to reproduce
Expected result
Cached pages should stay in varnish
Actual result
Whole varnish were purged
Additional information
/vendor/magento/framework/App/Cache/Manager.php : get all cache type to clean
Release note
No response
Triage and priority