devtron icon indicating copy to clipboard operation
devtron copied to clipboard

Webhook for SSH based git material is failing

Open prince-vishal opened this issue 2 years ago • 0 comments

If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in Devtron Discord channel.

Checklist:

  • [ ] I've searched in the docs and FAQ for my answer
  • [ ] I've included steps to reproduce the bug.

Describe the bug

When you use an ssh based git material, and create a Webhook workflow. It does not work.

Logs

{"level":"dpanic","ts":1655111426.7268195,"caller":"zap/sugar.go:173","msg":"Ignored key without a value.","ignored":1,"stacktrace":"go.uber.org/zap.(*SugaredLogger).Debugw\n\t/go/src/github.com/devtron-labs/git-sensor/vendor/go.uber.org/zap/sugar.go:173\ngithub.com/devtron-labs/git-sensor/pkg/git.WebhookEventServiceImpl.UpdateWebhookParsedEventData\n\t/go/src/github.com/devtron-labs/git-sensor/pkg/git/WebhookEventService.go:101\ngithub.com/devtron-labs/git-sensor/pkg/git.WebhookHandlerImpl.HandleWebhookEvent\n\t/go/src/github.com/devtron-labs/git-sensor/pkg/git/WebhookHandler.go:102\ngithub.com/devtron-labs/git-sensor/pkg/git.GitWatcherImpl.SubscribeWebhookEvent.func1\n\t/go/src/github.com/devtron-labs/git-sensor/pkg/git/Watcher.go:352\ngithub.com/nats-io/nats%2ego.(*Conn).waitForMsgs\n\t/go/src/github.com/devtron-labs/git-sensor/vendor/github.com/nats-io/nats.go/nats.go:2667"}
{"level":"debug","ts":1655111426.7268097,"caller":"git/WebhookEventService.go:101","msg":"updating webhook parsed event data for id : "}
{"level":"info","ts":1655111426.8236337,"caller":"sql/connection.go:68","msg":"query time","duration":0.096733671,"query":"UPDATE webhook_event_parsed_data AS \"webhook_event_parsed_data\" SET \"event_id\" = 2, \"payload_data_id\" = 39, \"unique_id\" = '99', \"event_action_type\" = 'merged', \"data\" = '{\"author\":\"Prince Sinha\",\"date\":\"2022-06-12T08:51:40.048573+00:00\",\"git url\":\"https://bitbucket.org/cybledev/api-engine/pull-requests/99\",\"source branch name\":\"feature/add-common-module\",\"source checkout\":\"5d6755cbe2d8\",\"target branch name\":\"develop\",\"target checkout\":\"dafc7b2aecf2\",\"title\":\"Add common module\"}', \"created_on\" = '2022-06-12 18:56:59.705442+00:00:00', \"updated_on\" = '2022-06-13 09:10:26.72680804+00:00:00' WHERE \"webhook_event_parsed_data\".\"id\" = 1"}
{"level":"debug","ts":1655111426.8236897,"caller":"git/WebhookEventService.go:112","msg":"matching CI trigger condition"}
{"level":"debug","ts":1655111426.8237062,"caller":"git/WebhookEventService.go:126","msg":"getting CI materials for URLs : [https://bitbucket.org/cybledev/api-engine https://bitbucket.org/cybledev/api-engine.git]"}
{"level":"info","ts":1655111426.923949,"caller":"sql/connection.go:68","msg":"query time","duration":0.100206002,"query":"SELECT \"git_material\".\"id\", \"git_material\".\"git_provider_id\", \"git_material\".\"url\", \"git_material\".\"fetch_submodules\", \"git_material\".\"name\", \"git_material\".\"checkout_location\", \"git_material\".\"checkout_status\", \"git_material\".\"checkout_msg_any\", \"git_material\".\"deleted\", \"git_material\".\"last_fetch_time\", \"git_material\".\"fetch_status\", \"git_material\".\"last_fetch_error_count\", \"git_material\".\"fetch_error_message\" FROM git_material AS \"git_material\" WHERE (deleted =FALSE ) AND (url in ('https://bitbucket.org/cybledev/api-engine','https://bitbucket.org/cybledev/api-engine.git') )"}
{"level":"info","ts":1655111426.9239883,"caller":"git/WebhookEventService.go:135","msg":"no materials found skipping."}
{"level":"info","ts":1655111427.0237923,"caller":"sql/connection.go:68","msg":"query time","duration":0.099948436,"query":"UPDATE git_material AS \"git_material\" SET \"git_provider_id\" = 2, \"url\" = '[email protected]:cybledev/athena.git', \"fetch_submodules\" = FALSE, \"name\" = NULL, \"checkout_location\" = '/git-base/47/[email protected]:cybledev/athena.git', \"checkout_status\" = TRUE, \"checkout_msg_any\" = NULL, \"deleted\" = FALSE, \"last_fetch_time\" = '2022-06-13 09:10:26.923833104+00:00:00', \"fetch_status\" = TRUE, \"last_fetch_error_count\" = NULL, \"fetch_error_message\" = NULL WHERE \"git_material\".\"id\" = 47"}

AB#321

prince-vishal avatar Jun 13 '22 09:06 prince-vishal