-
Notifications
You must be signed in to change notification settings - Fork 949
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
bugfix: corrent the import path of logrus #953
bugfix: corrent the import path of logrus #953
Conversation
We found this is your first time to contribute to Pouch, @faycheng |
Thanks a lot for your contribution. CI fails and I am afraid that :
We need to gofmt the code. @faycheng |
1b1ef32
to
d88707a
Compare
sorry, i will solve it |
Codecov Report
@@ Coverage Diff @@
## master #953 +/- ##
=======================================
Coverage 13.06% 13.06%
=======================================
Files 123 123
Lines 8235 8235
=======================================
Hits 1076 1076
Misses 7063 7063
Partials 96 96
Continue to review full report at Codecov.
|
d88707a
to
8befccc
Compare
Could you help to review this? |
I tested this PR on my local machine, and it works fine indeed. Please help to take a look at this. @rudyfly But I have to say without the change brought by this PR, the master code still works fine like the follwowing:
|
volume/core.go
Outdated
"github.com/alibaba/pouch/pkg/client" | ||
metastore "github.com/alibaba/pouch/pkg/meta" | ||
"github.com/alibaba/pouch/volume/driver" | ||
volerr "github.com/alibaba/pouch/volume/error" | ||
"github.com/alibaba/pouch/volume/types" | ||
"github.com/alibaba/pouch/volume/types/meta" | ||
"github.com/sirupsen/logrus" | ||
|
||
"github.com/pkg/errors" | ||
log "github.com/sirupsen/logrus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add the import pkg "github.com/sirupsen/logrus"
, I think you could remove this line "github.com/sirupsen/logrus"
, right? @faycheng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx, i will remove it
network/mode/bridge/bridge.go
Outdated
"github.com/alibaba/pouch/network" | ||
"github.com/alibaba/pouch/pkg/errtypes" | ||
"github.com/sirupsen/logrus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please move this line to L15, since this is a third-party package. We have a rule of how to import packages in :
When importing packages, to improve readabilities, we should import package by sequence: system packages, project's own packages and third-party packages. And we should keep a blank line among these three kinds of packages;
8befccc
to
0ab4da8
Compare
daemon/mgr/network.go
Outdated
@@ -23,6 +22,7 @@ import ( | |||
networktypes "github.com/docker/libnetwork/types" | |||
"github.com/pkg/errors" | |||
"github.com/sirupsen/logrus" | |||
netlog "github.com/sirupsen/logrus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think L24 and L25 are duplicated as well.
Signed-off-by: 程飞 <fay.cheng.cn@gmail.com>
0ab4da8
to
8e70a80
Compare
LGTM |
@@ -411,15 +410,15 @@ func (nm *NetworkManager) getNetworkSandbox(id string) libnetwork.Sandbox { | |||
|
|||
func initNetworkLog(cfg *config.Config) { | |||
if cfg.Debug { | |||
netlog.SetLevel(netlog.DebugLevel) | |||
logrus.SetLevel(logrus.DebugLevel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Libnetwork's logrus version is different from pouchd, so we need to set libnetwork's logrus addintionly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
known
Ⅰ. Describe what this PR did
1, rename upper-case 'Sirupsen' to 'sirupsen'
2, change import path
extra/libnetwork/Godeps/_workspace/src/github.com/Sirupsen/logrus
togithub.com/sirupsen/logrus
Ⅱ. Does this pull request fix one issue?
fixes #949
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews