Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

summary: log failure message to terminal (#1033) #1043

Merged
merged 1 commit into from
May 27, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Apr 20, 2021

cherry-pick #1033 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In br repo:
git pr https://github.com/pingcap/br/pull/1043

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/br.git pr/1043:release-5.0-ac3a0e726cbd

What problem does this PR solve?

Fixed #1016.

What is changed and how it works?

diff --git a/pkg/summary/collector.go b/pkg/summary/collector.go
index 84dabaeb..3e3264d1 100644
--- a/pkg/summary/collector.go
+++ b/pkg/summary/collector.go
@@ -188,7 +188,7 @@ func (tc *logCollector) Summary(name string) {
                for unitName, reason := range tc.failureReasons {
                        logFields = append(logFields, zap.String("unit-name", unitName), zap.Error(reason))
                }
-               log.Info(name+" failed summary", logFields...)
+               tc.log(name+" failed summary", logFields...)
                return
        }

tc.Log would tee events to terminal.

BTW: should be replace this with things like logutil.InfoTerm, which would be more generic?

Check List

Tests

  • Manual test (add detailed scripts or steps below)

image

Release Note

  • Fix a bug that caused, when backup failed, nothing would be printed to terminal.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@kennytm
Copy link
Collaborator

kennytm commented Apr 21, 2021

/lgtm

@lonng
Copy link
Contributor

lonng commented May 11, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • kennytm
  • lonng

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels May 11, 2021
@3pointer
Copy link
Collaborator

/lgtm

@3pointer
Copy link
Collaborator

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: d4ea0c5

@lonng lonng added this to the v5.0.2 milestone May 27, 2021
@lonng
Copy link
Contributor

lonng commented May 27, 2021

/merge

@lonng
Copy link
Contributor

lonng commented May 27, 2021

/run-all-tests

@ti-chi-bot ti-chi-bot merged commit 27d6c12 into pingcap:release-5.0 May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants