Skip to content

Mongo v.4 storage implementaton #50

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

Merged
merged 3 commits into from
Mar 4, 2020
Merged

Conversation

OlgaMinyaeva
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Feb 26, 2020

Codecov Report

Merging #50 into master will increase coverage by 1%.
The diff coverage is 70.18%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master      #50    +/-   ##
========================================
+ Coverage   63.67%   64.68%    +1%     
========================================
  Files          21       23     +2     
  Lines         881     1042   +161     
========================================
+ Hits          561      674   +113     
- Misses        277      304    +27     
- Partials       43       64    +21
Impacted Files Coverage Δ
pool/node.go 83.33% <ø> (ø) ⬆️
storage/mysql/storage.go 66.66% <ø> (ø) ⬆️
pool/strategy/kubernetes/strategy.go 76.92% <ø> (ø) ⬆️
pool/strategy/persistent/strategy.go 79.24% <ø> (ø) ⬆️
storage/mongo/factory.go 57.5% <57.5%> (ø)
storage/mongo/mongo.go 74.38% <74.38%> (ø)

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 b27f8fa...676224e. Read the comment docs.

@OlgaMinyaeva OlgaMinyaeva changed the title Mongo storage implementaton Feb 27, 2020
@OlgaMinyaeva
Copy link
Contributor Author

OlgaMinyaeva commented Feb 27, 2020

Добавить проверку на версию MongoDB>=4, и в документации это отразить

Copy link
Member

@andrskom andrskom left a comment

Choose a reason for hiding this comment

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

LGTM


import (
"context"
"errors"

Choose a reason for hiding this comment

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

File is not goimports-ed with -local github.com/qa-dev/jsonwire-grid (from goimports)

Suggested change
"errors"
"errors"
"strconv"
"strings"
return err
}

majorVersion, err := strconv.Atoi(strings.Split(version.StringValue(), ".")[0])

Choose a reason for hiding this comment

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

ineffectual assignment to err (from ineffassign)

func checkServerVersion(ctx context.Context, client *mongo.Client) error {
serverStatus, err := client.Database("admin").RunCommand(
ctx,
bsonx.Doc{{"serverStatus", bsonx.Int32(1)}},

Choose a reason for hiding this comment

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

composites: github.com/qa-dev/jsonwire-grid/vendor/go.mongodb.org/mongo-driver/x/bsonx.Elem composite literal uses unkeyed fields (from govet)

@OlgaMinyaeva
Copy link
Contributor Author

merge please)

@andrskom andrskom merged commit 18e6f4e into qa-dev:master Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants