-
Notifications
You must be signed in to change notification settings - Fork 123
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
add progress bar support for apptainer push/pull for oras protocol #1587
Conversation
31d4d7a
to
5bb31ea
Compare
I tested push/pull and both works great! Thank you @JasonYangShadow ! |
I'm surprised this has a whole new source file just for the oras protocol. Aren't there progress bars on other protocols that can share code? Or is this the first one and it should be extended to others? Why should we treat the oras protocol specially? |
@DrDaveD -san, Please feel free to follow up or to correct me @JasonYangShadow and @cclerget . |
Are you saying the code can't be refactored to share at least the visual part of the progress bar implementation? That's not good for maintenance, because one implementation might get changed to improve something and the others forgotten. |
Thank you @DrDaveD -san, I see your point. I'll discuss with @JasonYangShadow about it tomorrow morning. |
I will take a look at current progressbar and mpb related implementation and see if we can reuse mpb. |
bfaa332
to
e3ffe34
Compare
@panda1100 I have rewritten the function using apptainer existing progressbar, the same we used previously. Please help verify and check if it is okay. |
@JasonYangShadow Thank you Jason! I did test on my end and works good for both push and pull 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an improvement. However I still don't like that there's a new function called getOrasResolver()
along with an old function called getResolver()
with the same parameters and only for oras, in fact in oras.go. It also looks like they're mostly identical code too.
I suggest renaming getOrasResolver
to getResolver
and adding a flag that makes it optionally behave like the existing getResolver
, then remove the current getResolver
.
e3ffe34
to
14847bf
Compare
Thanks for the comments, next time I will be more serious on the duplicated code. |
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
14847bf
to
aab871d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also cherry-pick to release-1.2
Thank you DrDave-san and Jason! |
Description of the Pull Request (PR):
add progress bar support for
apptainer push/pull
for oras protocolThis fixes or addresses the following GitHub issues:
apptainer push
#437Before submitting a PR, make sure you have done the following:
make check
and tested this PR locally with amake test
, andmake testall
if possible (see CONTRIBUTING.md).Test
Apptainer Push
Apptainer Pull