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

expression: panic in test mode if builtin function's PbCode unspecified #13334

Merged
merged 7 commits into from Nov 12, 2019
Merged

expression: panic in test mode if builtin function's PbCode unspecified #13334

merged 7 commits into from Nov 12, 2019

Conversation

lonng
Copy link
Contributor

@lonng lonng commented Nov 11, 2019

Signed-off-by: Lonng heng@lonng.org

What problem does this PR solve?

  1. Update the tipb to the latest version which makes detect missing PbCode easily.
  2. Panic in test mode if builtin function's PbCode unspecified

What is changed and how it works?

Update go.mod and add a fail point to build expression to Protobuf.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No need.

@lonng lonng requested a review from a team as a code owner November 11, 2019 02:15
@ghost ghost requested review from qw4990 and wshwsh12 and removed request for a team November 11, 2019 02:15
@sykp241095
Copy link
Member

/run-unit-test

@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

Merging #13334 into master will decrease coverage by 0.3456%.
The diff coverage is 98.9011%.

@@               Coverage Diff                @@
##             master     #13334        +/-   ##
================================================
- Coverage   80.5814%   80.2358%   -0.3457%     
================================================
  Files           469        469                
  Lines        114638     112866      -1772     
================================================
- Hits          92377      90559      -1818     
- Misses        15198      15297        +99     
+ Partials       7063       7010        -53

Signed-off-by: Lonng <heng@lonng.org>
Signed-off-by: Lonng <heng@lonng.org>
Deardrops
Deardrops previously approved these changes Nov 12, 2019
Copy link
Contributor

@Deardrops Deardrops left a comment

Choose a reason for hiding this comment

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

LGTM

breezewish
breezewish previously approved these changes Nov 12, 2019
Signed-off-by: Lonng <heng@lonng.org>
expression/expr_to_pb.go Outdated Show resolved Hide resolved
expression/expr_to_pb.go Outdated Show resolved Hide resolved
@zimulala zimulala added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 12, 2019
Deardrops
Deardrops previously approved these changes Nov 12, 2019
Copy link
Contributor

@Deardrops Deardrops left a comment

Choose a reason for hiding this comment

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

LGTM

@lonng
Copy link
Contributor Author

lonng commented Nov 12, 2019

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 12, 2019
@lonng lonng added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 12, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

/run-all-tests

breezewish
breezewish previously approved these changes Nov 12, 2019
Signed-off-by: Lonng <heng@lonng.org>
@lonng lonng merged commit 6b9703b into pingcap:master Nov 12, 2019
@lonng lonng deleted the fix-pb-code branch November 12, 2019 07:31
@@ -30,6 +31,14 @@ import (
"github.com/pingcap/tipb/go-tipb"
)

func init() {
fpname := "github.com/pingcap/tidb/expression/PanicIfPbCodeUnspecified"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not put it to TestPanicIfPbCodeUnspecified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's should affect all tests.

XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants