Skip to content

Commit

Permalink
5xx fix 2.0 (#78)
Browse files Browse the repository at this point in the history
* Fix for fetching commit info

* Fix for fetching commit info

* Fix for fetching commit info

* common lib version change

* common lib version change to main latest

* minor import fixes

---------

Co-authored-by: Prakash Kumar <prakash.kumar@devtron.ai>
  • Loading branch information
ShashwatDadhich and prakash100198 authored Jan 21, 2024
1 parent 448286b commit bd235ac
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
3 changes: 2 additions & 1 deletion api/GrpcHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ func (impl *GrpcHandlerImpl) GetCommitMetadataForPipelineMaterial(ctx context.Co
return nil, err
}
if res == nil {
return nil, nil
res1 := &pb.GitCommit{}
return res1, nil
}

// Mapping GitCommit
Expand Down
2 changes: 1 addition & 1 deletion api/Router.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (r MuxRouter) Init() {
pProfListenerRouter := r.Router.PathPrefix("/gitsensor/debug/pprof/").Subrouter()
statsVizRouter := r.Router.PathPrefix("/gitsensor").Subrouter()

r.monitoringRouter.InitMonitoringRouter(pProfListenerRouter, statsVizRouter)
r.monitoringRouter.InitMonitoringRouter(pProfListenerRouter, statsVizRouter, "/gitsensor")
r.Router.StrictSlash(true)
r.Router.Handle("/metrics", promhttp.Handler())
r.Router.Path("/health").HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/caarlos0/env v3.5.0+incompatible
github.com/devtron-labs/common-lib v0.0.9
github.com/devtron-labs/common-lib v0.0.10-0.20240118140811-762cb3b7f9a4
github.com/devtron-labs/protos v0.0.2
github.com/gammazero/workerpool v0.0.0-20200206003619-019d125201ab
github.com/go-pg/pg v6.15.1+incompatible
Expand All @@ -21,6 +21,7 @@ require (
golang.org/x/sys v0.15.0
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.31.0
gopkg.in/src-d/go-billy.v4 v4.3.2
gopkg.in/src-d/go-git.v4 v4.13.1
)

Expand Down Expand Up @@ -63,7 +64,6 @@ require (
golang.org/x/net v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
mellium.im/sasl v0.3.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/devtron-labs/common-lib v0.0.9 h1:uM5NUa8BPubTO5oM5jlkOiGRpj/g4L3csSnYZ51ZEgA=
github.com/devtron-labs/common-lib v0.0.9/go.mod h1:95/DizzVXu1kHap/VwEvdxwgd+BvPVYc0bJzt8yqGDU=
github.com/devtron-labs/common-lib v0.0.10-0.20240118140811-762cb3b7f9a4 h1:S2ouUWhefHd3UQjP7gAfrjpqDM5qr/sfnsveQcv+aQo=
github.com/devtron-labs/common-lib v0.0.10-0.20240118140811-762cb3b7f9a4/go.mod h1:95/DizzVXu1kHap/VwEvdxwgd+BvPVYc0bJzt8yqGDU=
github.com/devtron-labs/protos v0.0.2 h1:BXrW3sXpUZKz25fbHHOAlnth1apHlALU3gfrbGd+WTY=
github.com/devtron-labs/protos v0.0.2/go.mod h1:l85jxWHlcSo910hdUfRycL40yGzC6glE93V1sVxVPto=
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ github.com/cespare/xxhash/v2
# github.com/davecgh/go-spew v1.1.1
## explicit
github.com/davecgh/go-spew/spew
# github.com/devtron-labs/common-lib v0.0.9
# github.com/devtron-labs/common-lib v0.0.10-0.20240118140811-762cb3b7f9a4
## explicit; go 1.20
github.com/devtron-labs/common-lib/constants
github.com/devtron-labs/common-lib/monitoring
Expand All @@ -25,6 +25,7 @@ github.com/devtron-labs/common-lib/pubsub-lib
github.com/devtron-labs/common-lib/pubsub-lib/metrics
github.com/devtron-labs/common-lib/pubsub-lib/model
github.com/devtron-labs/common-lib/utils
github.com/devtron-labs/common-lib/utils/bean
# github.com/devtron-labs/protos v0.0.2
## explicit; go 1.17
github.com/devtron-labs/protos/gitSensor
Expand Down

0 comments on commit bd235ac

Please sign in to comment.