Open MagicLegend opened 2 years ago
Potential issues I've found during usage:
magerun
is an alias for docker-compose run --rm deploy magerun2
Here I had left query logging enabled:
magerun sys:cron:list
Creating <project>-docker_deploy_run ... done
In Write.php line 62:
The path "/app/var/debug/db.log" is not writable.
sys:cron:list [--format [FORMAT]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--root-dir [ROOT-DIR]] [--skip-config] [--skip-root-check] [--skip-core-commands] [--skip-magento-compatibility-check] [--] <command>
ERROR: 1
Disabling query logging fixed the issue.
This appeared to happen after a cache flush and before a setup:di:compile
:
magerun sys:cron:list
Creating <project>-docker_deploy_run ... done
In ClassReader.php line 28:
Class Magento\Cron\Model\ResourceModel\Schedule\Collection\Interceptor does not exist
sys:cron:list [--format [FORMAT]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--root-dir [ROOT-DIR]] [--skip-config] [--skip-root-check] [--skip-core-commands] [--skip-magento-compatibility-check] [--] <command>
ERROR: 1
Manually running setup:di:compile
fixed the issue.
Due to the container executing magerun
as www-data
it cannot write log files:
Xdebug: [Log Files] File '/app/var/log/xdebug-deploy.log' could not be opened
Can we do something about the permissions this user has on the var/log
directory?
:white_check_mark: All functional acceptance tests have passed.
This comment was generated by Jenkins job magento-cloud-docker/functional build 126.
Description
This PR adds the N98-Magerun2 binary to the CLI containers to be used during development. Magerun can be ran in a similar fashion as the other commands.
Fixed Issues (if relevant)
Manual testing scenarios
E.g. in the
images/php/7.4-cli
folder:docker build --tag magento/magento-cloud-docker-php:7.4-cli-1.3.2-magerun .
docker run --rm magento/magento-cloud-docker-php:7.4-cli-1.3.2-magerun magerun2 list
It should output the list of possible commands. I have noticed that for me it was required to force ANSI output with the
--ansi
flag; is this only on my machine, or reproducible across the board? If the latter we should consider updating themagerun2
command to always pass the--ansi
flag.I have tested the
7.2-cli
,7.3-cli
and7.4-cli
containers. I might have missed some incompatibility somewhere.Release notes
Associated documentation updates
If this change will be accepted I will do the digging in the DevDocs to add references to this functionality to it.
Contribution checklist