Skip to content

fix: add healthcheck test command, fixes #29#30

Merged
stasadev merged 1 commit intoddev:mainfrom
coolbrewed:bugfix/add-healthcheck-command
Mar 11, 2026
Merged

fix: add healthcheck test command, fixes #29#30
stasadev merged 1 commit intoddev:mainfrom
coolbrewed:bugfix/add-healthcheck-command

Conversation

@coolbrewed
Copy link
Contributor

The Issue

Podman requires a healthcheck.test command will fail with the following error if it's not defined:

Error response from daemon: fill out specgen: must define a healthcheck command for all healthchecks

Note: The test command is a required part of the Docker Compose spec for healthcheck, but different Docker provider tools may choose to treat it as ignored/skip if not present, or to treat it as a fatal issue.

How This PR Solves The Issue

This PR adds a simple "always healthy" shell return for the test command.

It meets 3 goals:

  1. Satisfies Podman's test command requirement
  2. Respects an earlier issue as to why the test command was removed in the first place, where an accurate healthcheck can cause the container to report healthy way too slowly (fix: healthcheck makes it come up too slowly #2 )
  3. Leaves the option to add in a different test command later

(Can confirm, when testing a couple of different variant son an accurate healthcheck: the response time was all over the place and very inconsistent. Sometimes it came back within half a second, other times it took over 80 seconds. Not too sure why!)

Another alternative would be to disable the healthcheck altogether, if it's not needed for local development with DDEV. This is also following the Docker Compose spec, and Podman will accept it:

healthcheck:
  test: ["NONE"]

Manual Testing Instructions

  1. Install and configure Podman as the Docker provider for DDEV
  2. Create a new DDEV project
  3. Install the proposed version of the add-on and restart DDEV:
ddev add-on get https://github.com/coolbrewed/ddev-phpmyadmin/tarball/bugfix/add-healthcheck-command
ddev restart

The phpMyAdmin project container should successfully build and run without the error.

Automated Testing Overview

This PR doesn't change the add-on's build or runtime behavior, just , so no tests need to be updated or added.

Release/Deployment Notes

This change should not impact any other code or deployment steps.

It's worth noting that setting the healthcheck key here should override any healthcheck later defined by the official phpMyAdmin Docker build itself, so it is good to keep it rather than omit in order to avoid being surprised by suddenly long healthcheck times.

Addresses two issues:
- [Podman requires a healthcheck test command](ddev#29), and will fail without it.
- Any accurate healthcheck test command for phpMyAdmin will [take forever to run](ddev#2) (80+ seconds!)

This commit adds a placeholder healthcheck test command that always returns true as soon as the container is responsive in local development, addressing both issues.
Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

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

Respects an earlier issue as to why the test command was removed in the first place

Thank you, looks good to me.

@stasadev stasadev changed the title Add healthcheck test command fix: add healthcheck test command, fixes #29 Mar 11, 2026
@stasadev stasadev merged commit a825152 into ddev:main Mar 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants