You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: #25039
Contrary to its specified behaviour (https://docs.podman.io/en/stable/markdown/podman-farm-build.1.html),
`podman farm build` *cannot* handle the more extended form of `--tag` that might be passed to it. Whilst
`--tag`s of the form `registry/repository` are handled ok, instances of the form `registry/repository:tag`
cause the farm to fail when attempting to push the images it has built to the registry.
This commit addresses that issue.
The primary cause (in list_builder.go) is the indiscriminate appending of the `UnknownDigestSuffix`
to ALL forms of the supplied `--tag` prior to pushing its associated images to the registry. This suffix
exists specifically to allow images to be pushed without either a digest or :tag, so attaching it
to an image actually bearing a :tag is a logical contradiction, and the construct subsequently gets
caught and kicked out by `docker_transport.go`.
This solution:
* amends list_builder.go as follows:
- the listLocal struct is refactored so that the provided `--tag` is held as a valid
`v5/docker/reference.Named` rather than as a plain string. The `--tag` string is then
made available to the program via two new member functions. It is made available in two
forms: a longer reference format (`registry/repository[:tag]`) and a shorter name format
(`registry/repository`). Some parts of the existing processing require the long `reference` form,
and others the short `name` form. The remainder of code has thus been amended to use the
contextually appropriate form;
- newManifestListBuilder() is amended so that it throws an errors if the `--tag` it is
to be build upon can't be transformed to a valid Reference.Named.
* amends farm.go to handle any new error thrown by the above;
* amends farm_build_test.go to provide additional test cases to exercise the above.
Signed-off-by: Kevin Crocombe <kevin.crocombe@pegortech.co.uk>
0 commit comments