-
Notifications
You must be signed in to change notification settings - Fork 185
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
refactor(progress): generic progress tracking #1524
base: main
Are you sure you want to change the base?
Conversation
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1524 +/- ##
==========================================
- Coverage 84.41% 84.23% -0.19%
==========================================
Files 120 121 +1
Lines 5460 5568 +108
==========================================
+ Hits 4609 4690 +81
- Misses 604 625 +21
- Partials 247 253 +6 ☔ View full report in Codecov by Sentry. |
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.
Built the code and tested a little bit. Got "panic: send on closed channel" error when running oras push localhost:5000/test:v1 foo
.
progress.StateTransmitting: PullPromptDownloading, | ||
progress.StateTransmitted: PullPromptPulled, | ||
progress.StateSkipped: PullPromptSkipped, | ||
progress.StateMounted: PullPromptRestored, |
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.
Just a note: This is a bit tricky, is "mounted" a "restored" the same idea in the pull context? If so, wondering if there is a better prompt than "restored".
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.
The StateMounted
is reused for PullPromptRestored
given the context of 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.
Yeah I understand the purpose. Just wondering if the prompt "restored" can just be called "mounted".
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.
It is not very clear what "mounted" means on a file system as we are not doing hard link or making something magic similar to copy-on-write filesystem.
A ha. This PR indeed requires further refactoring. |
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
This PR is an implementation of oras-project/oras-go#839.
The goal is to refactor the core code of progress reporting from the
oras
CLI code base in order to put it intooras-go
for others to implement their own progress reporting method.The refactored code is in the
internal/progress
package.