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

Optimizer Preview Seems to Be incompatible with Magento Cloud Pro #909

Closed
jordanvector opened this issue May 11, 2018 · 4 comments
Closed

Comments

@jordanvector
Copy link

Preconditions

Magento Version : 2.2.4

ElasticSuite Version : 2.5.9

Environment : Prod

Third party modules :

Steps to reproduce

  1. Create optimizer and run a preview query on MCE pro
  2. 503 is returned /admin/smile_elasticsuite_catalog_optimizer/optimizer/preview/ajax/1/key/c920c29c5a03ef18ad1b162993d8a33985fd1f84b201acf3e1516537fe659d68/?isAjax=true 503 ()

What seems to be happening is that the optimizer preview is trying to generate a factory on the fly and is failing because magento cloud will not let it write to the generated folder. The magento cloud pro environment symlinks the generated folder and is the not writable after the build process (Only for pro environments). So for now it looks like this feature is not compatible with MCE pro. MCE integration environments work (because its a single node system and has permission to write to the generated folder after deployment).

Expected result

  1. Products returned

Actual result

  1. [Screenshot, logs]

Here is the full stack trace:

Stack trace
RuntimeException: Noticed exception 'RuntimeException' with message 'Can't create directory /app/7alebf6ygqtlm/generated/code/Smile/ElasticsuiteCatalogOptimizer/Model/Optimizer/Collection/Provider/. in [Smile\ElasticsuiteCatalogOptimizer\Model\Optimizer\Collection\Provider\ExcludeFactory]' in /app/7alebf6ygqtlm/vendor/magento/framework/Code/Generator.php:115
in Magento\Framework\Code\Generator::generateClass called at /app/7alebf6ygqtlm/vendor/magento/framework/Code/Generator/Autoloader.php (35)
in Magento\Framework\Code\Generator\Autoloader::load called at ? (?)
in spl_autoload_call called at ? (?)
in ReflectionClass::__construct called at /app/7alebf6ygqtlm/vendor/magento/framework/Code/Reader/ClassReader.php (19)
in Magento\Framework\Code\Reader\ClassReader::getConstructor called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Definition/Runtime.php (44)
in Magento\Framework\ObjectManager\Definition\Runtime::getParameters called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Factory/Compiled.php (100)
in Magento\Framework\ObjectManager\Factory\Compiled::create called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Factory/Compiled.php (150)
in Magento\Framework\ObjectManager\Factory\Compiled::get called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Factory/Compiled.php (125)
in Magento\Framework\ObjectManager\Factory\Compiled::parseArray called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Factory/Compiled.php (86)
in Magento\Framework\ObjectManager\Factory\Compiled::create called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Factory/Compiled.php (150)
in Magento\Framework\ObjectManager\Factory\Compiled::get called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/Factory/Compiled.php (79)
in Magento\Framework\ObjectManager\Factory\Compiled::create called at /app/7alebf6ygqtlm/vendor/magento/framework/ObjectManager/ObjectManager.php (56)
in Magento\Framework\ObjectManager\ObjectManager::create called at /app/7alebf6ygqtlm/generated/code/Smile/ElasticsuiteCatalogOptimizer/Model/Optimizer/PreviewFactory.php (43)
in Smile\ElasticsuiteCatalogOptimizer\Model\Optimizer\PreviewFactory::create called at /app/7alebf6ygqtlm/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-optimizer/Controller/Adminhtml/Optimizer/Preview.php (129)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview::getPreviewObject called at /app/7alebf6ygqtlm/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-optimizer/Controller/Adminhtml/Optimizer/Preview.php (93)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview::execute called at /app/7alebf6ygqtlm/vendor/magento/framework/App/Action/Action.php (107)
in Magento\Framework\App\Action\Action::dispatch called at /app/7alebf6ygqtlm/vendor/magento/module-backend/App/AbstractAction.php (229)
in Magento\Backend\App\AbstractAction::dispatch called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (58)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview\Interceptor::___callParent called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (138)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview\Interceptor::Magento\Framework\Interception{closure} called at /app/7alebf6ygqtlm/vendor/magento/module-backend/App/Action/Plugin/Authentication.php (143)
in Magento\Backend\App\Action\Plugin\Authentication::aroundDispatch called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (135)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview\Interceptor::Magento\Framework\Interception{closure} called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (153)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview\Interceptor::___callPlugins called at /app/7alebf6ygqtlm/generated/code/Smile/ElasticsuiteCatalogOptimizer/Controller/Adminhtml/Optimizer/Preview/Interceptor.php (26)
in Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview\Interceptor::dispatch called at /app/7alebf6ygqtlm/vendor/magento/framework/App/FrontController.php (55)
in Magento\Framework\App\FrontController::dispatch called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (58)
in Magento\Framework\App\FrontController\Interceptor::___callParent called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (138)
in Magento\Framework\App\FrontController\Interceptor::Magento\Framework\Interception{closure} called at /app/7alebf6ygqtlm/vendor/magento/framework/Interception/Interceptor.php (153)
in Magento\Framework\App\FrontController\Interceptor::___callPlugins called at /app/7alebf6ygqtlm/generated/code/Magento/Framework/App/FrontController/Interceptor.php (26)
in Magento\Framework\App\FrontController\Interceptor::dispatch called at /app/7alebf6ygqtlm/vendor/magento/framework/App/Http.php (135)
in Magento\Framework\App\Http::launch called at /app/7alebf6ygqtlm/vendor/magento/framework/App/Bootstrap.php (256)
in Magento\Framework\App\Bootstrap::run called at /app/7alebf6ygqtlm/pub/index.php (37)

@afoucret
Copy link
Contributor

Just to be sure it is not related to #908, did you manage to finish compile ?
Else it is fully normal.

@jordanvector
Copy link
Author

jordanvector commented May 11, 2018

Yep without the target rule module search compiles, indexes, and displays results correctly. This is specifically for the preview feature in the optimzer

@afoucret
Copy link
Contributor

OK
Will have a look monday at this one.

afoucret pushed a commit to afoucret/elasticsuite that referenced this issue May 14, 2018
afoucret added a commit that referenced this issue May 14, 2018
Fix #909 - Fix optimizer provider compile.
@afoucret
Copy link
Contributor

This bug should be solved by PR #910 and it will be part of the upcoming 2.5.10 maintenance release.
I close since a patch have been proposed in the PR. Feel free to test it and give us a feedback.

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

No branches or pull requests

2 participants