Only pull image before containers teardown if podman version >= 5.6.0#1427
Open
mokibit wants to merge 3 commits intocontainers:mainfrom
Open
Only pull image before containers teardown if podman version >= 5.6.0#1427mokibit wants to merge 3 commits intocontainers:mainfrom
mokibit wants to merge 3 commits intocontainers:mainfrom
Conversation
ccfe0f8 to
1ddc8da
Compare
a3955e3 to
151e835
Compare
|
Any update on this PR review? It kinda blocks the new release :) |
After container teardown, podman `create` internally pulls missing images using the default --pull=missing policy. By explicitly calling podman `pull` before teardown, we reduce container downtime. This requires to pass the --policy=missing option to podman `pull` to maintain podman-compose's defaults. Since this option was introduced in Podman 5.6.0, the optimization is only available from that version onwards. This commit also fixes the `Error: unknown flag: --policy` errors. Missing integration tests failed to catch compatibility issues with older Podman versions. podman pull documentation: https://docs.podman.io/en/stable/markdown/podman-pull.1.html compose specification for pull_policy: https://github.com/compose-spec/compose-spec/blob/main/05-services.md#pull_policy Signed-off-by: Monika Kairaityte <monika@kibit.lt>
Commit adds integration tests for containers#1298 - Feat pull images before teardown containers on up command (ef9785a) Signed-off-by: Monika Kairaityte <monika@kibit.lt>
151e835 to
8f1735d
Compare
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
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.
This PR adds missing integration tests (#1426) and fixes the
Error: unknown flag: --policyerrors (#1417).Integration tests for #1298 (Feat pull images before teardown containers on up command, ef9785a) were missing, so compatibility issues with older Podman versions were not caught.
This PR restricts running
podman pullprior to tearing down containers to Podman 5.6.0+ only.This Podman version introduced the
--policyflag for podmanpull, which defaults toalways, unlikepodman-compose up, which defaults tomissing. Using--policy missingensures the pull behavior matches the expected behavior ofpodman-compose.podman
pull --policydocumentation:https://docs.podman.io/en/stable/markdown/podman-pull.1.html
compose specification for
pull_policy:https://github.com/compose-spec/compose-spec/blob/main/05-services.md#pull_policy