-
Notifications
You must be signed in to change notification settings - Fork 141
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
Handle archive upload general progress bar counter incrementation #1019
Conversation
# Conflicts: # .github/workflows/analysis.yml # go.mod # go.sum # utils/utils.go # xray/services/scan.go # xray/services/scan_test.go
# Conflicts: # utils/utils.go
…-errors # Conflicts: # go.sum
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
artifactory/services/upload.go
Outdated
// saveFilesPathsFunc (optional) is a func that is called for each file that is written into the ZIP, and gets the file's local path as a parameter. | ||
func (us *UploadService) readFilesAsZip(archiveDataReader *content.ContentReader, progressPrefix string, flat, symlink bool, | ||
func (us *UploadService) readFilesAsZip(archiveDataReader *content.ContentReader, isZipDryRun, flat, symlink bool, |
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.
isZipDryRun --> dryRun
In addition to removing the redundant "zip" section from the argument name, that is unnecessary beucase the function's content is already related to the zip, it's preferred to avoid adding the "is" prefix to boolean variables.
Let's change the argument's description as well.
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.
@eyalbe4 its on purpose. We already have a dryRun expression among JFrog CLI command so I didn't want to confuse with that known flag.
Do you have another idea?
Signed-off-by: Michael Sverdlov <[email protected]>
Today, all files uploaded as part of an archive are counted for the total number of tasks (denominator), but the numerator are counted only at the end of the zip upload as 1 task.
So for 60k files it's 1/60000 till the end of the upload.
This PR fixes it.