Skip to content

ctr: Return error if task.Metrics fails#4548

Merged
AkihiroSuda merged 1 commit intocontainerd:masterfrom
darfux:ret_error_if_metric_fails
Sep 10, 2020
Merged

ctr: Return error if task.Metrics fails#4548
AkihiroSuda merged 1 commit intocontainerd:masterfrom
darfux:ret_error_if_metric_fails

Conversation

@darfux
Copy link
Copy Markdown
Contributor

@darfux darfux commented Sep 10, 2020

Signed-off-by: Li Yuxuan [email protected]

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 10, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

metric, err := task.Metrics(ctx)
if err != nil {
return nil
return err
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like this was added in #2504

@samuelkarp I don't see a mention in that PR of this being done on purpose, so I assume it's ok to change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I probably did this because sometimes I saw a task with no metrics? But all of ctr is effectively sample/debugging code, so I see no issue with making this change.

@AkihiroSuda AkihiroSuda merged commit c862000 into containerd:master Sep 10, 2020
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.

4 participants