Warn and drop the broken healthcheck.start_interval mapping - #1539
Open
wahajahmed010 wants to merge 1 commit into
Open
Warn and drop the broken healthcheck.start_interval mapping#1539wahajahmed010 wants to merge 1 commit into
wahajahmed010 wants to merge 1 commit into
Conversation
The previous behaviour translated Compose's healthcheck.start_interval field to the Podman flag --health-startup-interval, but those two have different semantics. Podman's --health-startup-interval belongs to a separate startup-healthcheck mechanism gated by --health-startup-cmd, which podman-compose does not generate. The result was that user compose.yaml files using start_interval silently lost the start_period interval behaviour defined in the Compose spec. Stop the incorrect translation and warn the user that start_interval is not currently supported. Once Podman ships a native equivalent (podman-container-tools/podman#26505), the field can be remapped to the matching Podman option. The existing test_healthcheck_options is updated to drop the start_interval input/expected output, and a new test_healthcheck_start_interval_warns_and_omits_podman_flag asserts the new contract (warning is emitted, no --health-startup-interval flag is added to the podman args). Fixes containers#1500 Signed-off-by: wahajahmed010 <wahajahmed010@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the silent mistranslation of
healthcheck.start_intervalto the Podman flag--health-startup-interval.The two have different semantics:
start_intervalchanges the interval of the regular healthcheck duringstart_period.--health-startup-intervalbelongs to a separate startup-healthcheck mechanism gated by--health-startup-cmd, which podman-compose does not generate.So
start_intervalwas being silently dropped from the user's intent, and the existing unit test only checked the generated CLI string rather than the resulting schedule.This PR stops the broken translation and emits a
log.warning(...)explaining thatstart_intervalis not currently supported, so users get an explicit signal instead of silent loss of behaviour. The mapping can be re-enabled once Podman ships a native equivalent (tracked in containers/podman#26505).Compose spec reference for
healthcheck.start_interval:https://github.com/compose-spec/compose-spec/blob/main/spec.md#healthcheck
Changes
podman_compose.py: drop the--health-startup-intervaltranslation; emit alog.warning(...)whenstart_intervalis set, including the service name and the upstream Podman tracking issue.tests/unit/test_container_to_args.py:test_healthcheck_optionsno longer asserts the (now-removed)--health-startup-intervaloutput.test_healthcheck_start_interval_warns_and_omits_podman_flagverifies the new contract: a warning mentioningstart_intervalis logged, and the resulting args list does not contain--health-startup-interval.newsfragments/start_interval_unsupported.bugfix: towncrier fragment.Verification
Fixes #1500
Signed-off-by: wahajahmed010 wahajahmed010@users.noreply.github.com