1692 Commits
Author SHA1 Message Date
Jan Rodák 525dfd8700 Merge pull request #29758 from haneul-24/fix/api-endpoint-content-type
fix: set correct content-type for generate kube
2026-09-15 11:09:46 +02:00
Paul Holzinger 687c5e644a Merge pull request #29525 from sahilnyk/exec-sigproxy-pgid
exec: forward signals to the exec session's process group
2026-09-14 13:32:46 +02:00
Sahil Nayak 903a1b6cb6 exec: forward signals to exec sessions over local and remote
Fixes: #19486
Signed-off-by: Sahil Nayak <contactsahilpnayak@gmail.com>
2026-09-11 21:32:26 +05:30
Matt Heon b638cc9f48 Merge pull request #29295 from InvalidInterrupt/fix_api_restart_def_timeout
Respect container StopTimeout in container restart REST APIs
2026-09-11 06:40:44 -04:00
Sejal b5b558d671 fix: set correct content-type for generate kube
Fixes: #29674
Signed-off-by: Sejal <sej1306kook@gmail.com>
2026-09-05 23:21:50 +00:00
Paul Holzinger 3222b4bc25 fix new golangci-lint staticcheck warnings
Looks like it picked up new deprecated matches so we need some more
nolint to silence them where we still need them for backwards compat in
the API.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-09-04 16:40:03 +02:00
Paul Holzinger 53a9bcbe13 run golangci-lint --fix
In order to fix the new formatting issues reported.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-09-04 16:30:10 +02:00
Paul Holzinger afe45cccb6 Merge pull request #29714 from Luap99/go-1.26
Update to Go 1.26
2026-09-04 15:48:09 +02:00
Paul Holzinger 8b216d16c4 Merge pull request #29656 from hkwi/fix-compat-stats-http-status
api: reflect container stats errors in HTTP status codes
2026-09-04 15:17:42 +02:00
Paul Holzinger 258001db67 Merge pull request #29496 from simek-m/RUN-3319-info-runtimes-status
compat: Add status for runtimes to GET /info
2026-09-04 13:54:34 +02:00
Hiroaki KAWAI d56f52c8a7 api: reflect container stats errors in HTTP status codes
Existing KillContainer handling uses HTTP status code 409 when the request cannot be performed because of the current container state. HTTP status code 404 is also used when the target container does not exist.

In contrast, errors from the stats handler are not reflected in the HTTP status code. The HTTP status code is always 200, and the errors are recorded only as generic errors in the server log.

To maintain compatibility with both streaming enabled and disabled, this change treats obtaining at least one complete unit of response content as the response contract. It then keeps the response content consistent with the HTTP status code.

Signed-off-by: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
2026-09-04 20:42:55 +09:00
Paul Holzinger 6c6eac3a5c run modernize -fix ./...
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>
2026-09-04 11:53:04 +02:00
Jan Rodák ec30171911 Merge pull request #29660 from simek-m/RUN-3316-compat-until-filter
compat: Document and test GET /images/json until filter
2026-09-04 11:45:24 +02:00
Marek Simek 81ec75c4ec compat: Add status for runtimes to GET /info
Docker API v1.44 now includes status properties
in Runtimes for the GET /info endpoint.

Read output of {oci_runtime_cmd} features command
lazily and expose the JSON
output as-is (with removed new lines and
whitespace) as the status field in GET
/info for v1.44+.

Add status to libpod GET /info in ociRuntime.features
and `podman info` (shared).

Add API tests for both endpoints.

Fixes: https://redhat.atlassian.net/browse/RUN-3319
Signed-off-by: Marek Simek <msimek@redhat.com>
2026-09-04 11:37:47 +02:00
Paul Holzinger f6487b7546 Merge pull request #29669 from CodeWithAK28/manifest-annotate-subject-remote
pkg/bindings, pkg/api: send the manifest index subject to the server
2026-09-03 18:21:01 +02:00
Garry Lawrence 545674291a Respect container StopTimeout in container restart REST APIs
RestartContainer was always setting options.Timeout with values
from query, without checking if the caller had specified them or if
they were simply zero values. Copy logic from StopContainer to check
for caller-specified values, leaving Timeout nil if not specified.

fixes: https://github.com/podman-container-tools/podman/issues/29276
Signed-off-by: Garry Lawrence <InvalidInterrupt@users.noreply.github.com>
2026-09-02 10:39:55 -07:00
Anisha Khairnar b760306614 pkg/bindings, pkg/api: send the manifest index subject to the server
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>
2026-09-02 11:57:43 +05:30
Ashley Cui af579ec299 Add --platform to podman push
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>
2026-09-01 11:30:48 -04:00
Marek Simek d6c2cf29dd compat: Document and test GET /images/json until filter
The `until` filter was missing from the documentation.
Document it for both GET /libpod/images/json and the
compat GET /images/json.

Add tests for the until filter exercising both endpoints.

Fixes: https://redhat.atlassian.net/browse/RUN-3316
Signed-off-by: Marek Simek <msimek@redhat.com>
2026-08-31 12:11:36 +02:00
Miloslav Trmač ca42cbff0a Merge pull request #29628 from mehrdadbn9/fix/29627-stats-nil-pointer
fix(api): nil check Memory.Limit before dereference in stats handler
2026-08-24 15:43:09 +02:00
Jan Rodák e14fafc21e Merge pull request #29592 from CodeWithAK28/docs-dedup-generate-kube
pkg/api/server: drop duplicate generate/kube swagger operation
2026-08-24 09:21:59 +02:00
Mehrdad Biukian Naeini 14506421f9 fix(api): nil check Memory.Limit before dereference in stats handler
When a container has --memory-reservation set without --memory-limit,
resources.Memory is non-nil but resources.Memory.Limit is nil. The
compat stats handler dereferences the nil Limit pointer, causing a
panic that returns a 500 to the client.

Fix: add resources.Memory.Limit != nil guard before the dereference.
Regression test added in test/apiv2/19-stats.at.

Fixes #29627

Signed-off-by: Mehrdad Biukian Naeini <mehrdadbiukian@gmail.com>
2026-08-23 18:20:37 +04:00
Matt Heon cf156a8ee3 Merge pull request #29468 from JamesBalazs/healthcheck-fix
support healthcheck: {} inherits healthcheck from image
2026-08-20 15:42:15 -04:00
Paul Holzinger e9b8854cf4 Merge pull request #29563 from vishnukothakapu/perf-walkdir
Performance: Upgrade filepath.Walk to filepath.WalkDir
2026-08-20 19:04:21 +02:00
Vishnu Kothakapu 7a71964303 Performance: Upgrade filepath.Walk to filepath.WalkDir
filepath.Walk makes an expensive os.Stat system call on every file. filepath.WalkDir uses os.ReadDir under the hood to bypass this overhead, making directory scanning much faster.

Fixes: #29562
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
2026-08-20 20:48:08 +05:30
Anisha Khairnar c1e2ece120 pkg/api/server: drop duplicate generate/kube swagger operation
Signed-off-by: Anisha Khairnar <anishakhairnar284@gmail.com>
2026-08-19 23:39:01 +05:30
Paul Holzinger 768072c6a8 Merge pull request #29572 from dexp007/main
compat/secrets: do not expose secret data on inspect endpoint
2026-08-19 15:55:51 +02:00
Davoud Azari b57e7075e2 compat/secrets: do not expose secret data on inspect endpoint
The Docker-compat secret inspect endpoint was incorrectly honoring
the showsecret query parameter, which could expose plaintext secret
data to clients using the Docker-compatible API.

This restricts showsecret to libpod-only requests. Docker-compat
clients always receive redacted secret data, matching Docker's own
behavior.

Add APIv2 tests covering the showsecret behavior on both the
Docker-compat and libpod endpoints, confirming secret data is never
returned from the compat endpoint while libpod continues to honor
the flag.

Fixes: #29570

Signed-off-by: Davoud Azari <davidmotral@gmail.com>
2026-08-19 14:30:37 +03:30
Matt Heon 732e7c9d26 Merge pull request #29574 from CodeWithAK28/docs-manifest-api-params
pkg/api/server: document missing manifest push and create params
2026-08-18 15:21:05 -04:00
Paul Holzinger 4d055045e5 Merge pull request #29489 from ashley-cui/tmpfs
Compat v1.46: support HostConfig.Mounts.TmpfsOptions for containers/create
2026-08-18 15:37:15 +02:00
Anisha Khairnar baddf266c1 pkg/api/server: document missing manifest push and create params
The manifest push and create endpoints accept query parameters that
were never documented, so API users can't discover them.

Push was missing compressionFormat, compressionLevel, format and
removeSignatures. Create was missing annotation and annotations.
The wording matches the same parameters on the image push endpoint.
The deprecated v3 push and add endpoints are left alone.

Signed-off-by: Anisha Khairnar <anishakhairnar284@gmail.com>
2026-08-18 12:39:30 +05:30
Ashley Cui 8e63c695f2 Compat v1.46: Support HostConfig.Mounts.TmpfsOptions for containers/create
POST /containers/create now takes Options as part of HostConfig.Mounts.TmpfsOptions to set options for tmpfs mounts.

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-08-14 21:14:49 -04:00
Matt Heon a2409076ef Merge pull request #29523 from ROKUMATE/docs-swagger-kube-play-params
pkg/api/server: document noHostname and noPodPrefix kube play params
2026-08-14 18:36:10 -04:00
ROKUMATE 0928ec5376 pkg/api/server: document noHostname and noPodPrefix kube play params
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-14 15:56:02 +05:30
James Balazs 16a1d3fbe9 support healthcheck: {} inherits healthcheck from image
Fixes: #29467

Signed-off-by: James Balazs <j.c.balazs1@gmail.com>
2026-08-14 01:27:39 +00:00
nXtCyberNet f76d9de01a added errorlint
Fixes: #29488
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
2026-08-14 01:35:03 +05:30
Ashley Cui d2ae516a39 api: Fix tmpfs mode when setting size
Fixed a bug where setting tmpfs size automatically set mode to 0000

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-08-12 19:27:14 -04:00
Matt Heon cbd17f7459 Merge pull request #29473 from ROKUMATE/swagger-checkpoint-createimage
pkg/api: document the createImage checkpoint query parameter
2026-08-12 10:26:11 -04:00
ROKUMATE 944fa71129 pkg/api: document the createImage checkpoint query parameter
Fixes: #29472
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-12 17:33:54 +05:30
Matt Heon 55c2d1c490 Merge pull request #25161 from danishprakash/empty-ignore-file
build: pass ignore file to buildah to consider empty ignore files
2026-08-07 07:57:30 -04:00
Matt Heon 0ad5459fab Merge pull request #29145 from ROKUMATE/feat-playkube-warn-unknown-keys
podman kube play: add --validate=ignore|warn|strict flag
2026-08-06 18:21:03 -04:00
ROKUMATE 0d09e609e4 add validate flag to podman kube play
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>
2026-08-05 17:42:40 +05:30
Rajkaran 2f9f412822 Merge branch 'podman-container-tools:main' into fix-swagger-artifact-annotations 2026-07-28 16:38:34 +05:30
Rajkaran Yadav 7018130ef8 swagger: rename artifact annotation field"
Signed-off-by: Rajkaran Yadav <yadavrajkaran854@gmail.com>
2026-07-28 16:15:35 +05:30
Ashley Cui 59af9c81e5 Docker compat v1.45 : deprecate is-automated field
searching for is-automated=true will yield no results, while is-automated=false will be a no-op

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-07-24 14:46:48 -04:00
Jan Rodák bb4695870e Merge pull request #28984 from stefan8/test/apiv2-manifest-create-images-query
test: add apiv2 coverage for the manifest-create images query param
2026-07-15 13:10:40 +02:00
Marek Simek 463b0b9829 api: Deprecate fields Container and ContainerConfig from GET /images/{name}/json
The Docker API deprecates Container and ContainerConfig fields in
the GET /images/{name}/json response are deprecated and
they will no longer be included in API v1.45.

Fixes: https://redhat.atlassian.net/browse/RUN-3323

Signed-off-by: Marek Simek <msimek@redhat.com>
2026-07-08 17:31:02 +02:00
Marek Simek 612c7b71b4 api: Deprecate response fields from GET /containers/{id}/json
The Docker API 1.44 deprecates the fields HairpinMode, LinkLocalIPv6Address,
LinkLocalIPv6PrefixLen, SecondaryIPAddresses, SecondaryIPv6Addresses available in
NetworkSettings when calling GET /containers/{id}/json and will be removed in a future release.
You should instead look for the default network in NetworkSettings.Networks.

The fields are removed in 1.52. Version gate SecondaryIPAddresses, SecondaryIPv6Addresses
in the handler and update test. HairpinMode, LinkLocalIPv6Address, LinkLocalIPv6PrefixLen
are not returned by the compat endpoint as the response is serialized
to the moby/moby/api structure missing these fields.

Fixes: https://redhat.atlassian.net/browse/RUN-3323

Signed-off-by: Marek Simek <msimek@redhat.com>
2026-07-08 17:31:02 +02:00
Marek Simek f4925bae8c api: Deprecate is-automated filter and field in GET /images/search endpoint
The Docker API in version 1.44 deprecates the is_automated field for
the GET /images/search endpoint. The is_automated field has been deprecated
by Docker Hub's search API. Consequently, searching for is-automated=true
will yield no results.

The Docker API in version 1.44 deprecates the is_automated field
in the GET /images/search response and will always be set to false in the
future because Docker Hub is deprecating the is_automated field in its search API.

Return struct moby/api for the compat endpoint that matches the Docker
API response format and deprecates is_automated.

Update test_v2_0_0_image.py::ImageTestCase::test_search_compat
to verify returned format and fix subtests not being asserted (remove mp).

Fixes: https://redhat.atlassian.net/browse/RUN-3323

Signed-off-by: Marek Simek <msimek@redhat.com>
2026-07-08 17:31:02 +02:00
Danish Prakash 7be083cc66 build: pass ignore file to buildah to consider empty ignore files
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>
2026-07-02 20:24:11 +05:30