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

Adds progress bar for image push #421

Merged

Conversation

shaheerkootteeri
Copy link
Contributor

@shaheerkootteeri shaheerkootteeri commented Jul 27, 2022

This PR resolves Issue #420 to have progress bar displayed for Image push.

Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

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

Made some comments on the PR it looks good. Let us try to see if we get these tests to pass

pkg/imgpkg/bundle/contents.go Outdated Show resolved Hide resolved
pkg/imgpkg/plainimage/contents.go Outdated Show resolved Hide resolved
pkg/imgpkg/registry/registry.go Outdated Show resolved Hide resolved
@shaheerkootteeri shaheerkootteeri temporarily deployed to TanzuNet Registry Dev e2e August 3, 2022 21:09 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to GCR e2e August 3, 2022 21:09 Inactive
@shaheerkootteeri shaheerkootteeri marked this pull request as ready for review August 4, 2022 19:48
@shaheerkootteeri shaheerkootteeri temporarily deployed to TanzuNet Registry Dev e2e August 4, 2022 21:04 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to GCR e2e August 4, 2022 21:04 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to TanzuNet Registry Dev e2e August 5, 2022 16:47 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to GCR e2e August 5, 2022 16:47 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to GCR e2e August 8, 2022 19:31 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to TanzuNet Registry Dev e2e August 8, 2022 19:31 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to TanzuNet Registry Dev e2e August 8, 2022 21:45 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to GCR e2e August 8, 2022 21:45 Inactive
// Start the display of the Progress Bar
func (l *ProgressBarLogger) Start(ctx context.Context, progressChan <-chan regv1.Update) {
ctx, cancelFunc := context.WithCancel(ctx)
l.cancelFunc = cancelFunc
Copy link
Contributor

Choose a reason for hiding this comment

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

im assuming we are not using ProgressBarLogger concurrently?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No we are not using

@@ -4,6 +4,8 @@
package registry

import (
context "context"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: redundant aliasing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove the alias

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commit.

excludedPaths []string
paths []string
excludedPaths []string
displayProgress bool
Copy link
Contributor

Choose a reason for hiding this comment

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

dead code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we wouldn't need the displayProgress flag as it is not used anymore, however we would need the paths and excluded paths. I will remove the displayProgress flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the displayProgress as part of the latest commit

if l.cancelFunc != nil {
l.cancelFunc()
}
if l.ui != nil && l.finalMessage != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to check on l.ui != nil here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the case of a NOOP progress logger as part of the bundle push , we are not passing any UI as there will not be any progress bar displaying. However we could have the same accepting ui as well and we would need the nil check to decide if possible to display final message.

@shaheerkootteeri shaheerkootteeri temporarily deployed to TanzuNet Registry Dev e2e August 10, 2022 18:45 Inactive
@shaheerkootteeri shaheerkootteeri temporarily deployed to GCR e2e August 10, 2022 18:45 Inactive
Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

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

LGTM

@joaopapereira joaopapereira merged commit c98dbca into carvel-dev:develop Aug 11, 2022
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.

None yet

4 participants