-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: Improve progress tracking #2888
Conversation
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.
LGTM
pkg/customresource/actionset.yaml
Outdated
@@ -325,6 +341,22 @@ spec: | |||
type: string | |||
description: Progress of completion in percentage | |||
jsonPath: .status.progress.percentCompleted | |||
- name: SizeDownloadedB | |||
type: integer | |||
description: Amount of data downloaded during action execution |
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.
description: Amount of data downloaded during action execution | |
description: Amount of data that has been downloaded |
what do you think about this?
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.
if you agree, we can change other columns as well.
pkg/progress/action.go
Outdated
@@ -144,6 +144,26 @@ func completedOrFailed(aIDX int, actionSet *crv1alpha1.ActionSet, phaseName stri | |||
return false | |||
} | |||
|
|||
func isPhaseProgressDiffer(a, b crv1alpha1.PhaseProgress) 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.
I am not able to figure out what exactly this function is, by reading the name. is it trying to figure out if phase progress is different?
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.
a
and b
both are phase progress, the function returns true if they are different, and false if they are similar.
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.
I can't think of a better name, do you have any ideas?
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.
maybe having different instead of differ would be a good idea? Or if we want to shorten we can just use Diff
instead of differ.
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.
LGTM
pkg/progress/action.go
Outdated
@@ -144,6 +144,26 @@ func completedOrFailed(aIDX int, actionSet *crv1alpha1.ActionSet, phaseName stri | |||
return false | |||
} | |||
|
|||
func isPhaseProgressDiffer(a, b crv1alpha1.PhaseProgress) 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.
maybe having different instead of differ would be a good idea? Or if we want to shorten we can just use Diff
instead of differ.
Co-authored-by: Vivek Singh <vivek.singh@veeam.com>
All notes were accepted. |
pkg/progress/action.go
Outdated
@@ -144,6 +144,26 @@ func completedOrFailed(aIDX int, actionSet *crv1alpha1.ActionSet, phaseName stri | |||
return false | |||
} | |||
|
|||
func isPhaseProgressDifferent(a, b crv1alpha1.PhaseProgress) 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.
just one small nit please feel free to ignore it if you think otherwise. because we have two PhaseProgresses here, should we rename this to
arePhaseProgressesDifferent
?
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.
I thought about this yesterday but my conclusion was - probably it's not so important. But since you have the same thoughts, probably that makes sense. Renamed.
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.
Location
Change Overview
Currently we are tracking only amounts of data uploaded during action or phase. This PR brings new counters which allows us to track both, uploaded and downloaded data.
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan