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

[patch] bugfix error assertion #680

Conversation

kpango
Copy link
Collaborator

@kpango kpango commented Sep 8, 2020

Signed-off-by: kpango i.can.feel.gravity@gmail.com

Description:

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.1
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

Signed-off-by: kpango <i.can.feel.gravity@gmail.com>
@pull-assistant
Copy link

pull-assistant bot commented Sep 8, 2020

Score: 0.96

Best reviewed: commit by commit


Optimal code review plan (1 warning)

[patch] bugfix error assertion

internal/errors/blob.go 50% changes removed in Merge branch 'master...

internal/errors/cassandra.go 50% changes removed in Merge branch 'master...

internal/errors/mysql.go 50% changes removed in Merge branch 'master...

internal/errors/redis.go 50% changes removed in Merge branch 'master...

     Merge branch 'master' into bugfix/internal-errors/DB-IsXXXX-function-e...

     fix

     🤖 Update license headers / Format go codes and yaml files

Powered by Pull Assistant. Last update a26faa2 ... d7d999b. Read the comment docs.

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 8, 2020

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

Merging #680 into master will increase coverage by 0.44%.
The diff coverage is 35.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #680      +/-   ##
==========================================
+ Coverage   15.13%   15.58%   +0.44%     
==========================================
  Files         411      413       +2     
  Lines       21537    21667     +130     
==========================================
+ Hits         3259     3376     +117     
- Misses      18024    18039      +15     
+ Partials      254      252       -2     
Impacted Files Coverage Δ
internal/db/storage/blob/s3/writer/writer.go 0.00% <0.00%> (ø)
internal/errors/blob.go 0.00% <0.00%> (ø)
internal/errors/cassandra.go 0.00% <0.00%> (ø)
internal/errors/errors.go 3.44% <0.00%> (-1.21%) ⬇️
internal/errors/mysql.go 0.00% <0.00%> (ø)
internal/errors/option.go 0.00% <0.00%> (ø)
internal/errors/redis.go 0.00% <0.00%> (ø)
internal/observability/metrics/metrics.go 0.00% <ø> (ø)
internal/compress/gob.go 100.00% <100.00%> (+72.09%) ⬆️
internal/db/storage/blob/s3/writer/option.go 100.00% <100.00%> (+85.71%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59df91e...d7d999b. Read the comment docs.

…error-assert-instantiate-problem

Signed-off-by: kpango <i.can.feel.gravity@gmail.com>
@kpango kpango force-pushed the bugfix/internal-errors/DB-IsXXXX-function-error-assert-instantiate-problem branch from a1e2c77 to 5491f0e Compare September 8, 2020 04:38
fix
Signed-off-by: kpango <i.can.feel.gravity@gmail.com>
@@ -260,7 +278,12 @@ func (c *client) deleteMulti(ctx context.Context, pfx, pfxInv string, keys ...st
var errs error
for k, res := range ress {
if err = res.Err(); err != nil {
errs = errors.Wrap(errs, errors.ErrRedisDeleteOperationFailed(k, err).Error())
err = errors.ErrRedisDeleteOperationFailed(k, err)
if errs == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments used in the if statement itself (wsl)

err = errors.ErrMySQLConnectionPingFailed
}
cerr := ctx.Err()
if cerr != nil{
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
File is not gofmt-ed with -s (gofmt)

rinx
rinx previously approved these changes Sep 8, 2020
@kpango
Copy link
Collaborator Author

kpango commented Sep 8, 2020

/rebase
/format
/approve
/changelog

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 8, 2020

[CHANGELOG] Please edit the following lines.

  • [patch] bugfix error assertion (#680)
  • 🤖 Automatically update k8s manifests (#679)

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 8, 2020

[REBASE] Rebase triggered by kpango for branch: bugfix/internal-errors/DB-IsXXXX-function-error-assert-instantiate-problem

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 8, 2020

[REBASE] Failed to rebase.

@kpango
Copy link
Collaborator Author

kpango commented Sep 8, 2020

/format

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 8, 2020

[FORMAT] Updating license headers and formatting go codes triggered by kpango.

@kpango kpango merged commit e3e2d63 into master Sep 8, 2020
@kpango kpango deleted the bugfix/internal-errors/DB-IsXXXX-function-error-assert-instantiate-problem branch September 8, 2020 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants