Skip to content
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 support for recording build time #468

Merged
merged 2 commits into from Jun 25, 2023
Merged

Conversation

wanjunlei
Copy link
Member

No description provided.

Signed-off-by: wanjunlei <wanjunlei@kubesphere.io>
@@ -174,6 +178,11 @@ func (r *BuilderReconciler) getBuilderResult(builder *openfunction.Builder, buil
builder.Status.State = res
builder.Status.Reason = reason
builder.Status.Message = message
if !builder.CreationTimestamp.IsZero() {
builder.Status.BuildTime = &metav1.Duration{
Duration: metav1.Now().UTC().Sub(builder.CreationTimestamp.UTC()).Truncate(time.Second),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're using BuildTime to indicate the time used to build the function, maybe we can use BuildDuration instead to be more clear

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: wanjunlei <wanjunlei@kubesphere.io>
@benjaminhuo benjaminhuo merged commit 5239261 into OpenFunction:main Jun 25, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants