diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 4e7d6f5db..4c0cb0c3b 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -216,7 +216,7 @@ package for linux amd64: GOARCH: "amd64" script: - echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list - - apt update && apt install nfpm + - apt update && apt install nfpm=2.11.3 - make package artifacts: paths: @@ -233,7 +233,7 @@ package for linux arm64: GOARCH: "arm64" script: - echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list - - apt update && apt install nfpm + - apt update && apt install nfpm=2.11.3 - make package artifacts: paths: diff --git a/server/grpc.go b/server/grpc.go index bd72dda9e..f54a3292f 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -1645,7 +1645,7 @@ func LogQuery(ctx context.Context, method string, req interface{}, logger logger } switch r := req.(type) { case *pb.QueryPQLRequest: - logger.Infof("GRPC: %v, %v, %v, %v, %v, %s", ip, ua, method, uinfo.UserID, uinfo.UserName, r.Pql) + logger.Infof("GRPC: %v, %v, %v, %v, %v, [%s]%s", ip, ua, method, uinfo.UserID, uinfo.UserName, r.Index, r.Pql) case *pb.QuerySQLRequest: logger.Infof("GRPC: %v, %v, %v, %v, %v, %s", ip, ua, method, uinfo.UserID, uinfo.UserName, r.Sql) default: diff --git a/server/grpc_test.go b/server/grpc_test.go index 376b44ff2..99ce9faf1 100644 --- a/server/grpc_test.go +++ b/server/grpc_test.go @@ -1453,8 +1453,8 @@ func TestLogQuery(t *testing.T) { }, { name: "QueryPQLReq", - req: &pb.QueryPQLRequest{Pql: "Count(All())"}, - expected: fmt.Sprintf("GRPC: %v, %v, %v, %v, %v, %v\n", "", []string{}, "test!", uinfo.UserID, uinfo.UserName, "Count(All())"), + req: &pb.QueryPQLRequest{Index: "index", Pql: "Count(All())"}, + expected: fmt.Sprintf("GRPC: %v, %v, %v, %v, %v, %v\n", "", []string{}, "test!", uinfo.UserID, uinfo.UserName, "[index]Count(All())"), }, } for _, test := range cases {