Skip to content

Conversation

@dklimpel
Copy link
Contributor

@dklimpel dklimpel commented Apr 9, 2025

I was already unable to use the old API with Podman 4.9

The current implementation for image push:

def push(
self, repository: str, tag: Optional[str] = None, **kwargs
) -> Union[str, Iterator[Union[str, dict[str, Any]]]]:
"""Push Image or repository to the registry.
Args:
repository: Target repository for push
tag: Tag to push, if given
Keyword Args:
auth_config (Mapping[str, str]: Override configured credentials. Must include
username and password keys.
decode (bool): return data from server as dict[str, Any]. Ignored unless stream=True.
destination (str): alternate destination for image. (Podman only)
stream (bool): return output as blocking generator. Default: False.
tlsVerify (bool): Require TLS verification.
format (str): Manifest type (oci, v2s1, or v2s2) to use when pushing an image.
Default is manifest type of source, with fallbacks.
Raises:
APIError: when service returns an error
"""
auth_config: Optional[dict[str, str]] = kwargs.get("auth_config")
headers = {
# A base64url-encoded auth configuration
"X-Registry-Auth": encode_auth_header(auth_config) if auth_config else ""
}

@dklimpel dklimpel force-pushed the fix_push_manifest branch from 1eeb166 to e53a67a Compare April 9, 2025 06:23
@dklimpel
Copy link
Contributor Author

dklimpel commented Apr 9, 2025

/assign umohnani8

@jwhonce
Copy link
Member

jwhonce commented Apr 10, 2025

@dklimpel Please add a test. TIA

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dklimpel, jwhonce

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: dklimpel <5740567+dklimpel@users.noreply.github.com>
Signed-off-by: dklimpel <5740567+dklimpel@users.noreply.github.com>
Signed-off-by: dklimpel <5740567+dklimpel@users.noreply.github.com>
@dklimpel dklimpel force-pushed the fix_push_manifest branch from bb2cf26 to 16257d5 Compare April 12, 2025 10:22
Signed-off-by: dklimpel <5740567+dklimpel@users.noreply.github.com>
@dklimpel
Copy link
Contributor Author

I have added some tests.

The failing test of CI podman/tests/integration/test_pods.py::PodsIntegrationTest::test_pod_crud seems to be unrelated.

The tests detected a wrong return type of encode_auth_header.

@inknos
Copy link
Contributor

inknos commented Apr 14, 2025

/packit retest-failed

1 similar comment
@inknos
Copy link
Contributor

inknos commented Apr 14, 2025

/packit retest-failed

@inknos
Copy link
Contributor

inknos commented Apr 14, 2025

test flakes addressed, LGTM

@jwhonce
Copy link
Member

jwhonce commented Apr 28, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 28, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 9d48125 into containers:main Apr 28, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants