Skip to content

refactor: detect custom files in ddev utility diagnose#8279

Merged
rfay merged 1 commit intoddev:mainfrom
stasadev:20260403_stasadev_custom_config_diagnose
Apr 3, 2026
Merged

refactor: detect custom files in ddev utility diagnose#8279
rfay merged 1 commit intoddev:mainfrom
stasadev:20260403_stasadev_custom_config_diagnose

Conversation

@stasadev
Copy link
Copy Markdown
Member

@stasadev stasadev commented Apr 3, 2026

The Issue

There's a new command added in:

We already use it in ddev utility test but not in ddev utility diagnose.

How This PR Solves The Issue

Refactors the logic to use ddev utility check-custom-config --all inside ddev utility diagnose

Manual Testing Instructions

Check the output for customizations:

ddev utility diagnose

ddev dotenv set .ddev/.env --test-env=true
ddev utility diagnose

Automated Testing Overview

Release/Deployment Notes

@stasadev stasadev requested a review from a team as a code owner April 3, 2026 07:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

@jonesrussell
Copy link
Copy Markdown
Contributor

Codex verification: I reproduced this behavior locally with the PR branch binary.

Repro 1: silenced file

ddev config --project-name pr8279manual --project-type php --docroot .
mkdir -p .ddev/php
printf "#ddev-silent-no-warn\nmemory_limit = 256M\n" > .ddev/php/silenced.ini
ddev utility check-custom-config
ddev utility check-custom-config --all
ddev utility diagnose

Output:

$ ddev utility check-custom-config
No custom configuration detected in project 'pr8279manual'.

$ ddev utility check-custom-config --all
Custom configuration detected in project 'pr8279manual':
  • PHP: /tmp/ddev-pr-8279-manual/.ddev/php/silenced.ini (#ddev-silent-no-warn)

$ ddev utility diagnose
⚠ Custom configuration detected in project 'pr8279manual':
  • PHP: /tmp/ddev-pr-8279-manual/.ddev/php/silenced.ini (#ddev-silent-no-warn)
  → Customizations can cause issues. Try temporarily removing them for testing.

Repro 2: add-on-managed files

ddev config --project-name pr8279addon --project-type php --docroot .
ddev add-on get ./cmd/ddev/cmd/testdata/TestUtilityCheckCustomConfigCmd/mock-myservice
ddev utility check-custom-config
ddev utility check-custom-config --all
ddev utility diagnose

Output:

$ ddev utility check-custom-config
No custom configuration detected in project 'pr8279addon'.

$ ddev utility check-custom-config --all
Custom configuration detected in project 'pr8279addon':
  • PHP: /tmp/ddev-pr-8279-addon-manual/.ddev/php/mock-myservice.ini (add-on mock-myservice) (#ddev-generated)
  …

$ ddev utility diagnose
⚠ Custom configuration detected in project 'pr8279addon':
  • PHP: /tmp/ddev-pr-8279-addon-manual/.ddev/php/mock-myservice.ini (add-on mock-myservice) (#ddev-generated)
  …
  → Customizations can cause issues. Try temporarily removing them for testing.

So diagnose is no longer using the warning-oriented behavior of check-custom-config; by calling --all, it now warns on files that default mode intentionally suppresses, including #ddev-silent-no-warn and add-on-managed files.

@rfay
Copy link
Copy Markdown
Member

rfay commented Apr 3, 2026

I do wonder why we haven't started using ddev utility diagnose in support, and whether people use it. Maybe they do. It's easier to read than ddev utility test.

Copy link
Copy Markdown
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks.

@rfay rfay merged commit 448a0a5 into ddev:main Apr 3, 2026
37 of 38 checks passed
@rfay rfay deleted the 20260403_stasadev_custom_config_diagnose branch April 3, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants