Skip to content

Conversation

@MayorFaj
Copy link
Contributor

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Fixed healthcheck arguments containing spaces being incorrectly split when creating containers via Docker-compatible API 

Summary
Healthcheck arguments containing spaces were being incorrectly split when creating containers via the Docker-compatible API.

Problem

When using docker-compose or the Docker API to create containers with healthchecks, arguments with spaces were being split incorrectly:

# Input
healthcheck:
  test: ["CMD", "/usr/bin/mysql", "--execute=SELECT 1;"]

# What was stored (broken)
["CMD", "/usr/bin/mysql", "--execute=SELECT", "1;"]

# What should be stored (fixed)
["CMD", "/usr/bin/mysql", "--execute=SELECT 1;"]

Fixes #26519

@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Dec 22, 2025
@MayorFaj MayorFaj force-pushed the fix/healthcheck-preserve-spaces branch from eb36167 to afa425d Compare December 22, 2025 23:47
Properly escape quotes in the Healthcheck JSON for BATS test framework.

Signed-off-by: MayorFaj <[email protected]>
Use single quotes for JSON to avoid shell escaping issues with spaces.

Signed-off-by: MayorFaj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/api-change Change to remote API; merits scrutiny

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HealthCheck tests inconsistently parsed by the compatibility API

1 participant