Skip to content

test: improve ddev debug test#7128

Merged
stasadev merged 2 commits into
ddev:mainfrom
stasadev:20250320_stasadev_ddev_debug_test
Mar 20, 2025
Merged

test: improve ddev debug test#7128
stasadev merged 2 commits into
ddev:mainfrom
stasadev:20250320_stasadev_ddev_debug_test

Conversation

@stasadev

Copy link
Copy Markdown
Member

The Issue

  • ddev debug test creates test project, which is probably included to instrumentation
  • curl on host runs without explicit timeout

How This PR Solves The Issue

  • Adds export DDEV_NO_INSTRUMENTATION=true inside the script.
  • Runs DOCKER_HOST="" docker context ls with empty DOCKER_HOST (because it always shown as a warning, but we set this variable ourselves in DDEV).
  • Fixes printf warnings shown to me in the IDE.
  • Adds docker system df output with tips how to clean it.
  • Do not show warning about instrumentation in ddev version if DDEV_NO_INSTRUMENTATION=true.
  • Adds curl --connect-timeout 10 --max-time 20 on the host to prevent people from using ^C.

Manual Testing Instructions

Run ddev debug test

Automated Testing Overview

Release/Deployment Notes

@stasadev stasadev requested a review from a team as a code owner March 20, 2025 11:45
@github-actions

Copy link
Copy Markdown

@rfay rfay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!


if [[ ${PWD} != ${HOME}* ]]; then
printf "\n\nWARNING: Project should usually be in a subdirectory of the user's home directory.\nInstead it's in ${PWD}\n\n"
printf "\n\nWARNING: Project should usually be in a subdirectory of the user's home directory.\nInstead it's in %s\n\n" "${PWD}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure why to make these printf changes, but they're fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

echo
if [ -f .ddev/mutagen/mutagen.yml ]; then
if grep '#ddev-generated' .ddev/mutagen/mutagen.yml; then
if grep -q '#ddev-generated' .ddev/mutagen/mutagen.yml; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Excellent. I always do >/dev/null and -q is better. And regardless, it's good to lose that output here.

Comment thread cmd/ddev/cmd/scripts/test_ddev.sh Outdated
Co-authored-by: Randy Fay <randy@randyfay.com>
@stasadev stasadev merged commit 8c39740 into ddev:main Mar 20, 2025
@stasadev stasadev deleted the 20250320_stasadev_ddev_debug_test branch March 20, 2025 15: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.

2 participants