Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix push endpoint stream #21004

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Conversation

umohnani8
Copy link
Member

@umohnani8 umohnani8 commented Dec 13, 2023

The push binding endpoint wasn't actually writing the output data to the stream when quiet=false and there was no push error.
Do not hard code quiet=true anymore, take into account the user input.

Does this PR introduce a user-facing change?

Fix a bug in the push binding endpoint where the output wasn't being added to the stream when the push was successful. 

Copy link
Contributor

openshift-ci bot commented Dec 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umohnani8

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2023
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Dec 13, 2023
@umohnani8
Copy link
Member Author

I am not sure if there is a way to add tests for this, it does look like there is a test for this here https://github.com/containers/podman/blob/main/test/apiv2/12-imagesMore.at#L36 but it doesn't work as expected? @edsantiago any idea if there is a good way to test this?

@Luap99
Copy link
Member

Luap99 commented Dec 13, 2023

I am not sure if there is a way to add tests for this, it does look like there is a test for this here https://github.com/containers/podman/blob/main/test/apiv2/12-imagesMore.at#L36 but it doesn't work as expected? @edsantiago any idea if there is a good way to test this?

Looks like the test is calling the compat endpoint and not the libpod one, so you need to add another which calls t POST libpod/images/...

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code changes itself LGTM, just two comments for the test

test/apiv2/12-imagesMore.at Outdated Show resolved Hide resolved
test/apiv2/12-imagesMore.at Outdated Show resolved Hide resolved
@edsantiago
Copy link
Member

Even with slashes removed, tests fail. @umohnani8 you can run tests locally with:

$ ./test/apiv2/test-apiv2 12 

The push binding endpoint wasn't actually writing the
output data to the stream when quiet=false and there
was no push error.
Do not hard code quiet=true anymore, take into account the
user input.

Signed-off-by: Urvashi Mohnani <[email protected]>
@umohnani8
Copy link
Member Author

Thanks @edsantiago, tests should be happy now!

@rhatdan
Copy link
Member

rhatdan commented Dec 13, 2023

LGTM
@Luap99 @mheon @baude @lsm5 @ashley-cui PTAL

@mheon
Copy link
Member

mheon commented Dec 13, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit b82e336 into containers:main Dec 13, 2023
90 of 92 checks passed
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Mar 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants