And tweak import formatting for one file which is now flagged.
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
TestConvertAdditionalBuildContexts asserted that the additional build
context "C:\test" is rewritten to "/mnt/c/test". That rewrite is done by
specgen.ConvertWinMountPath, which is a no-op unless shouldResolveWinPaths()
is true: always on Windows, but on Linux only when the client runs inside a
WSL or Hyper-V guest. On an ordinary Linux host the value is passed through
unchanged and the test fails.
Keep the platform independent expectations (URLs, images and unix paths are
never rewritten) in the shared test and move the drive letter case to a
Windows only file, following the existing split in pkg/specgen.
Signed-off-by: Daksha1611 <mehtadaksha1611@gmail.com>
Allow deployments and scheduled jobs to update a selected group of
containers without checking every auto-update-enabled application.
Reuse the existing container filters and expose them through the CLI,
remote bindings, and REST API.
Filter update candidates while preserving systemd unit and pod restart
behavior. Document the selection semantics and cover filtered updates,
invalid input, remote requests, and pod restarts in the existing tests.
Signed-off-by: Evan Purkhiser <git@evanpurkhiser.com>
The tunnel engine builds its own ScpOptions, so without this the flags parse
fine under podman --remote and are then dropped, transferring uncompressed with
no indication that anything was ignored.
Carry both options through the bindings to the libpod ImageScp handler, which
hands them to ExecuteTransfer the same way the local path does, and document
them on the endpoint.
This is also the point at which the transfer's own validation becomes reachable
over HTTP, so map it accordingly: a rejected format or level is the caller's
mistake and answers 400, not the 500 every error from the transfer used to
produce.
Signed-off-by: Scott Callaway <github@scottcallaway.co.uk>
Since I use go 1.26 the go fix does not have all the rules built in,
there are newer ones in modernize so run the explicitly to fix more code
for go 1.26.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Plus manually deleting the left over inline functions because go fix
doesn't do that even though they are private functions.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The remote client uploads the artifact files from a goroutine and waits for it with a sync.WaitGroup, but the goroutine never calls Done(), so Wait() blocks for good and the command never returns. Nothing caught it because no test ran manifest add --artifact against podman-remote.
Start the goroutine with WaitGroup.Go, which releases the counter on its own once the upload is finished.
Signed-off-by: Anisha Khairnar <anishakhairnar284@gmail.com>
Two commands can set a subject on a manifest list, podman manifest annotate --index --subject and podman manifest add --artifact-subject. Both work locally, but they do nothing at all when podman runs with --remote.
The value never leaves the client. Before sending the request the remote client copies everything into manifests.ModifyOptions and manifests.AddArtifactOptions, and neither struct had a field to hold the subject, so it was quietly thrown away. The server had a second problem of its own, ManifestModify rebuilds ManifestAddArtifactOptions by hand and left out the embedded ManifestAnnotateOptions, so --os, --arch and --annotation were being dropped there as well.
Add the missing field to both structs, fill it in from the tunnel ImageEngine, and let the handler pass the annotate options along. Also add two system tests that run both flags for real so the remote path stays covered.
Signed-off-by: Anisha Khairnar <anishakhairnar284@gmail.com>
When pushing a manifest list, --platform=OS[/Arch[/Variant]] selects and pushes a single platform-specific manifest instead of the entire list.
Also, update compat POST /images/{name}/push to support the platform param (Compat v1.46)
Signed-off-by: Ashley Cui <acui@redhat.com>
ExecStart returning only means the session was started, so inspecting it
straight after can still catch it running. It passed serially because
echo is quick, but it failed the first time the suite ran under -p:
[FAILED] session should not be running
Expected
<bool>: true
to be false
Wait for Running to go false before checking the exit code.
Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
The network config dir is shared between all the services these tests
start, on purpose, so podman can keep subnet allocation consistent. That
means the unfiltered prune in the networks BeforeEach, and system.Prune
which also prunes networks, would take out networks belonging to another
test once the suite runs in parallel.
Mark both describes serial like test/e2e does for its own network prune
test rather than trying to give each test its own config dir.
Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
ignore warn and strict modes for unknown yaml fields and kinds
ignore is the default and skips them warn reports them strict fails
warnings are returned in the play report so they show up in the cli and over the api for tools like podman desktop
Closes#18332
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
We currently only pass parsed excludes from the ignore file to buildah
and not the ignorefile path. This causes buildah to ignore
`--ignorefile` if the specified file is empty resulting in an empty
exludes. Forward ignoreFile to the server and allow overriding default
ignore files.
Signed-off-by: Danish Prakash <contact@danishpraka.sh>
Add `--ignore` to `podman network rm` so removing a missing
network returns success instead of exit code 1.
Keep existing error behavior for networks in use and other failures.
This commit message was translated from Korean to English using an LLM.
Fixes: #28363
Signed-off-by: KyounghoonJang <matkimchi_@naver.com>
Add a podman volume rename command, REST API endpoint, and bindings for renaming volumes.
The rename updates both the VolumeConfig and VolumeState tables in a single transaction and moves the volume directory on disk, rolling back if the transaction fails. Renaming an anonymous volume converts it to a named volume. Volumes that are in use, mounted, or backed by a volume plugin or the image driver cannot be renamed.
Fixes: #28189
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
Wrap ssh.DialNet in a goroutine so it respects context cancellation,
skip retries on context/timeout errors, and invalidate the cached
connection on failure.
Fixes: https://github.com/containers/podman/issues/28453
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
A later invocation to url.Parse() needs a preceding scheme,
otherwise the hostname just gets discarded.
Fixes#25067
Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com>
Signed-off-by: KILA <32559459+kila-star1127@users.noreply.github.com>
Commit cf021c4ba9 switched the logic to also allow golangci-lint in
$PATH but forgot to update the call here.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Using os.Is{Exist,NotExist,Permission} checks is not recommended in the
new code (see official documentation). While using it in the existing
code is OK, it may still result in a subtle errors later (for a specific
example of that, see [1]).
Replace those with errors.Is.
Generated by:
gofmt -r 'os.IsExist(a) -> errors.Is(a, os.ErrExist)' -w .
gofmt -r 'os.IsNotExist(a) -> errors.Is(a, os.ErrNotExist)' -w .
gofmt -r 'os.IsPermission(a) -> errors.Is(a, os.ErrPermission)' -w .
goimports -w .
git diff vendor test/tools/vendor | patch -p1 -R
[1]: https://github.com/opencontainers/runc/pull/5061
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add a --dry-run option to show which volumes would be pruned without removing them.
Related: #27838
Signed-off-by: KyounghoonJang <matkimchi_@naver.com>
Podman defaults to the directory of the Containerfile when no context dir is explicitly provided.
When running podman build with process subsituiton, `podman build -f <(echo "FROM scratch")`,
the Containerfile path expands to `/dev/fd/<NUM>`, which makes `/dev/fd` the context dir.
When building, Buildah attempts to create an overlay mount on top of the `/dev/fd` context dir, which fails.
In these cases, use a temp context dir instead: `$TMPDIR/podman-build-context-$randnum`
Fixes: https://github.com/containers/podman/issues/28113
Signed-off-by: Ashley Cui <acui@redhat.com>
The podman module paths are moving from github.com/containers/podman to
go.podman.io/podman. This will help with future mobility.
Signed-off-by: Brent Baude <bbaude@redhat.com>
This PR reflects the upstream change of moving the buildah module from
github.com/containers/buildah to go.podman.io/buildah.
Signed-off-by: Brent Baude <bbaude@redhat.com>
These are two new Buildah flags that we need to wire into Podman
(both local and remote) and document, with the interesting note
that one requires the other and a check needed to be added for
that.
Also: secret parsing was tightened up in Buildah, and was
breaking the remote build tests. Rewire it to use the new parser
Buildah made, which ends up simplifying the code considerably.
Tests are back to passing afterwards.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
The server already does validate this so this is not strictly needed and
the client must trust the server no matter what.
But adding an extra check here does not hurt and may help prevent future
bugs.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>