Skip to content

Refactor remote pull to provide progress#7647

Merged
openshift-merge-robot merged 1 commit intocontainers:masterfrom
jwhonce:issues/7543
Sep 17, 2020
Merged

Refactor remote pull to provide progress#7647
openshift-merge-robot merged 1 commit intocontainers:masterfrom
jwhonce:issues/7543

Conversation

@jwhonce
Copy link
Copy Markdown
Member

@jwhonce jwhonce commented Sep 16, 2020

Fixes #7543

Tested with:

$ (echo '# start'; podman-remote pull nginx ) 2>&1 | ts '[%Y-%m-%d %H:%M:%.S]'
$ (echo '# start'; podman pull nginx ) 2>&1 | ts '[%Y-%m-%d %H:%M:%.S]'

Signed-off-by: Jhon Honce jhonce@redhat.com

@jwhonce jwhonce added the kind/bug Categorizes issue or PR as related to a bug. label Sep 16, 2020
@jwhonce jwhonce requested a review from vrothberg September 16, 2020 00:02
@jwhonce jwhonce self-assigned this Sep 16, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 16, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jwhonce

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

The pull request process is described here

Details 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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 16, 2020
@jwhonce
Copy link
Copy Markdown
Member Author

jwhonce commented Sep 16, 2020

@vrothberg This moves remote closer to abi, but the progress bars are still off. Do you have experience with why they would be different?

@edsantiago
Copy link
Copy Markdown
Member

@jwhonce you need to rebase on master to fix CI. My fault, sorry.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unrelated to this PR: I believe pull can/should support --authfile.

@vrothberg
Copy link
Copy Markdown
Member

@vrothberg This moves remote closer to abi, but the progress bars are still off. Do you have experience with why they would be different?

I'll fetch the PR and have a look

@vrothberg
Copy link
Copy Markdown
Member

@vrothberg This moves remote closer to abi, but the progress bars are still off. Do you have experience with why they would be different?

I'll fetch the PR and have a look

Got it. We have a check in containers/image to not render the progress bars if the provided writer is not a TTY. The reasoning was to prevent verbose and ugly logs. In such cases, we only print a single line indicating an operation.

I will play a bit with c/image and see what we can do. I see it as an extension to this PR that we can tackle later.

Copy link
Copy Markdown
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Just a couple of nits.

Note that rendering progress bars as the local client could be a longer journey:

  • The progress bars are rendered by containers/image (i.e., the backend) and we don't have a notion of a front end.
  • We could hijack the connection as we do with attach and allow to control the client terminal.
  • Or we do some extensive rewrite in c/image, and allow the rendering on the client side (via progress messages from the server).

I think keeping the output as is may be the best option at the moment. Hijacking seems overly complex and I don't think we have enough resources to break the progress bars out of c/image.

podman and podman-remote do not exactly match as the lower layer code
checks if the output is destined for a  TTY before creating the progress
bars.  A future PR for containers/images could change this behavior.

Fixes containers#7543

Tested with:

$ (echo '# start'; podman-remote pull nginx ) 2>&1 | ts '[%Y-%m-%d %H:%M:%.S]'
$ (echo '# start'; podman pull nginx ) 2>&1 | ts '[%Y-%m-%d %H:%M:%.S]'

Signed-off-by: Jhon Honce <jhonce@redhat.com>
@jwhonce jwhonce marked this pull request as ready for review September 16, 2020 17:48
@jwhonce jwhonce changed the title [WIP] Refactor remote pull to provide progress Refactor remote pull to provide progress Sep 16, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 16, 2020
Copy link
Copy Markdown
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

@vrothberg
Copy link
Copy Markdown
Member

Restarted what looked like a flake in the ubuntu job

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Sep 17, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 17, 2020
@openshift-merge-robot openshift-merge-robot merged commit 9f745d5 into containers:master Sep 17, 2020
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2020
 - pause test: enable when rootless + cgroups v2
   (was previously disabled for all rootless)

 - run --pull: now works with podman-remote
   (in containers#7647, thank you @jwhonce)

 - various other run/volumes tests: try reenabling
   It looks like containers#7195 was fixed (by containers#7451? I'm not
   sure if I'm reading the conversation correctly).
   Anyway, remove all the skip()s on 7195. Only time
   will tell if it's really fixed)

Also:

 - new test for podman image tree --whatrequires
   (because TIL). Doesn't work with podman-remote.

Signed-off-by: Ed Santiago <santiago@redhat.com>
@jwhonce jwhonce deleted the issues/7543 branch June 30, 2021 16:10
@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 Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
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/bug Categorizes issue or PR as related to a bug. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Podman remote commands do not provide same textual feedback as local

6 participants