containers / containers/podman-compose

`pull_policy` does not meet the compose specification

Open
#1,475 0 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

In the current implementation, the values accepted for `pull_policy` are `always`, `missing`, `never`, or `newer`.

https://github.com/containers/podman-compose/blob/0f6537e9cfa38f6035ac57c1716b6d55dbaf3ca4/podman_compose.py#L4804-L4812

On the other hand, the [specification] defines the following values.

```json
{
"type": "string",
"pattern": "always|never|build|if_not_present|missing|refresh|daily|weekly|every_([0-9]+[wdhms])+",
"description": "Policy for pulling images. Options include: 'always', 'never', 'if_not_present', 'missing', 'build', or time-based refresh policies."
}
```

[specification]: https://github.com/compose-spec/compose-go/blob/d48021c526f32b243486f0e059b32bd0540c2d05/schema/compose-spec.json#L709-L713

Therefore, `newer` is excess, while `build`, `if_not_present`, `refresh`, and the time-based refresh policies lacking support.

## Related issues

- #615

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.