tyler36 / ddev-php-dumper

Collect and manage 'dump' information in Docker Desktop
Apache License 2.0
0 stars 1 forks source link

Remove "extra_hosts" #5

Closed tyler36 closed 1 month ago

tyler36 commented 1 month ago

This PR removes the "extra_hosts" section which was "required" by Desktop Docker.

This week (2024-09-17), tests against HEAD began failing with the following error:

 services.web.extra_hosts array items[0,1] must be unique'

After investigation, the addon appears to work without the line in WSL with Docker Desktop 4.32.2 and DDEV 1.23.4

Manual Test

  1. Install project in WSL using Docker Desktop as docker provider.
  2. Confirm project is accessible
  3. Install addon following instructions for Docker Desktop.
  4. Add dump('hello') to website and hit it.
  5. Output should not appear on page, instead appearing in PHP Dump in Docker Desktop.
tyler36 commented 1 month ago

Tests pass when run locally with DDEV v1.22.7-409-g507cfca25 (HEAD).

$ bats tests/test.bats                                               
test.bats
 ✓ install from directory
   ddev get /home/user13/code/packages/ddev-php-dumper/tests/.. with project test-php-dump in /home/user13/tmp/test-php-dump (/home/user13/tmp/test-php-dump)
 ✓ install from release
   ddev get tyler36/ddev-php-dumper with project test-php-dump in /home/user13/tmp/test-php-dump (/home/user13/tmp/test-php-dump)

2 tests, 0 failures

$ ddev -v   
ddev version v1.22.7-409-g507cfca25
rfay commented 1 month ago

Yeah, it makes sense they would pass on WSL2/Docker Desktop, because DDEV doesn't add that stanza with Docker Desktop, so it wouldn't be duplicated.

tyler36 commented 1 month ago

Able to replicate on Gitpod when using HEAD (1.23.4-37-g507cfca25) Project fails to start with

validating /workspace/lara11-base-demo/.ddev/docker-compose.php-dumper.yaml: services.web.extra_hosts array items[0,1] must be unique 
Failed to restart lara11-base-demo: composeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-lara11-base-demo docker-compose -f /workspace/lara11-base-demo/.ddev/.ddev-docker-compose-base.yaml -f /workspace/lara11-base-demo/.ddev/docker-compose.php-dumper.yaml config', action='[config]', err='exit status 15', stdout='', stderr='validating /workspace/lara11-base-demo/.ddev/docker-compose.php-dumper.yaml: services.web.extra_hosts array items[0,1] must be unique' 
tyler36 commented 1 month ago

Technically, test are working as expect. Only single test, DDEV HEAD aginst release is failing. Release doesn't include this fix so fails. DDEV HEAD aginst this PR passes.

(Other PRs submit today show 2 fails, DDEV HEAD against release and DDEV HEAD against PR)