-
Notifications
You must be signed in to change notification settings - Fork 1
Add snapshot duration field in QdrantClusterSnapshot status #43
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
Conversation
Signed-off-by: Emruz Hossain <[email protected]>
7c5de67 to
0e44aca
Compare
Signed-off-by: Emruz Hossain <[email protected]>
| RetainUntil *metav1.Time `json:"retainUntil,omitempty"` | ||
| // Duration specifies how long it took for the snapshot to complete | ||
| // +optional | ||
| Duration *metav1.Duration `json:"duration,omitempty"` |
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.
Duration for the field name is too ambiguous - how about CompletionTime, since we speak about that in the comment above?
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 like CompletionTIme
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.
+1
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.
Okay. Then, which one should we chose?
CompletionTime *metav1.Duration `json:"completionTime,omitempty"`CompletionTimeSeconds *int `json:"completionTimeSeconds,omitempty"`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.
Renamed Duration to CompletionTime
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 would go for CompletionTimeSeconds if the operation is never shorter than 1s.
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.
We will sent this as string to cluster-api. So, it will be much easier to have this as metav1.Duration. It will automatically format into human-readable string.
If we use CompletionTimeSeconds, then we have to reformat it in the cluster-api side before we show to the user. Also, it will not look good on additional print column.
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 will automatically format into human-readable string.
You should then document what is the schema of the field, i.e. how it should be parsed if somebody need that.
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.
Added comment showing sample format.
Signed-off-by: Emruz Hossain <[email protected]>
Signed-off-by: Emruz Hossain <[email protected]>
Ticket: https://github.com/qdrant/cloud-pm/issues/1769