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 error with purge when doing cache:clean #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esteban-serfe
Copy link

This MR fixes the issue with the missing X-Magento-Tags-Patters header required when running with the latest magento cloud image (1bf045d9164d)
https://hub.docker.com/r/magento/magento-cloud-docker-varnish

[2023-03-09 13:36:32] report.ERROR: Error flushing Varnish server. Host: "varnish". PURGE response code: 400 message: X-Magento-Tags-Pattern header required 
#0 /app/vendor/scandipwa/persisted-query/src/Model/PurgeCache.php(97): ScandiPWA\PersistedQuery\Model\PurgeCache->validateResponse(Object(Laminas\Uri\Uri), 'HTTP/1.1 400 X-...') 
#1 /app/vendor/scandipwa/persisted-query/src/Cache/Response.php(51): ScandiPWA\PersistedQuery\Model\PurgeCache->sendPoolPurgeRequest('persisted_q_res...') 
#2 /app/vendor/magento/framework/App/Cache/TypeList.php(195): ScandiPWA\PersistedQuery\Cache\Response->clean() 
#3 /app/vendor/magento/framework/App/Cache/Manager.php(91): Magento\Framework\App\Cache\TypeList->cleanType('persisted_query...') 
#4 /app/vendor/magento/module-backend/Console/Command/CacheCleanCommand.php(36): Magento\Framework\App\Cache\Manager->clean(Array) 
#5 /app/vendor/magento/module-backend/Console/Command/AbstractCacheTypeManageCommand.php(62): Magento\Backend\Console\Command\CacheCleanCommand->performAction(Array) 
#6 /app/vendor/symfony/console/Command/Command.php(255): Magento\Backend\Console\Command\AbstractCacheTypeManageCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#7 /app/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#8 /app/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Backend\Console\Command\CacheCleanCommand\Interceptor->___callParent('run', Array) 
#9 /app/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Console\Command\CacheCleanCommand\Interceptor->Magento\Framework\Interception\{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#10 /app/generated/code/Magento/Backend/Console/Command/CacheCleanCommand/Interceptor.php(77): Magento\Backend\Console\Command\CacheCleanCommand\Interceptor->___callPlugins('run', Array, Array)
 #11 /app/vendor/symfony/console/Application.php(1009): Magento\Backend\Console\Command\CacheCleanCommand\Interceptor->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#12 /app/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Backend\Console\Command\CacheCleanCommand\Interceptor), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#13 /app/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#14 /app/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#15 /app/bin/magento(23): Symfony\Component\Console\Application->run() #16 {main} [] []

In PurgeCache.php line 129:
                                                                                                                            
  Error flushing Varnish server. Host: "varnish". PURGE response code: 400 message: X-Magento-Tags-Pattern header required  
                                                                                                                            

cache:clean [--bootstrap BOOTSTRAP] [--] [<types>...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant