e2e docker environments are hard to tweak/adjust setup, because docker config files are "hard coded" in various scripts #9337
Labels
focus: devops
Release processes, monitoring, automations, dev tools, CI/CD pipeline
type: developer experience
type: enhancement
The issue is a request for an enhancement.
Describe the bug
docker-compose
automatically searches for acompose.yml
and an optional, local developer override filecompose.override.yml
(akadocker-compose.yml
anddocker-compose.override.yml
in earlier versions. From the docs:This flexibility is really useful, especially when debugging problems, or trying out different options as part of iterating on and improving our system.
Our e2e setup hard-codes the main compose config in various helper scripts. This means that it's not practical to override any docker settings locally – to do so, you'd need to hack the helper scripts. Examples:
woocommerce-payments/tests/e2e/env/up.sh
Lines 11 to 17 in 244b7c9
woocommerce-payments/tests/e2e/env/setup.sh
Lines 106 to 110 in 244b7c9
woocommerce-payments/tests/e2e/env/setup.sh
Lines 67 to 68 in 244b7c9
Proposed improvement
-f
– so we get the default behaviour.This would allow me to use override files to fix the config of the db containers.
Alternatives:
db
container user has enough access (i.e. fix the permissions issue).Permission denied
issues with mysql data and mounted (docker) volume #3946).Why I care
I haven't been able to run the e2e environment. The
db
container dies very soon after launch.I suspect this is because our default docker setup exposes mysql data (for server and client) as a shared folder. My main development environment uses
docker-compose.override.yml
to use a named volume instead, which works perfectly for me (and I think it's a more robust approach – I don't think we need to expose the data folder). See related issue for main dev env:Permission denied
issues with mysql data and mounted (docker) volume #3946If I could use an override file for all the various WordPress containers needed for e2e, I could specify a named volume instead of a mount, and 🤞 hopefully write and run more e2e tests.
The text was updated successfully, but these errors were encountered: