zapier/kubechecks

VCS error?

Closed this issue · 2 comments

Or Argo error?

vcsToArgoMap.GetAppsInRepo seems to be the culprit. is it failing trying to compare?

10:40PM INF Server Configuration: 
10:40PM INF Webhook URL Base: http://kubechecks.myorg.io
10:40PM INF Webhook URL Prefix: 
10:40PM INF VCS Type: github
Starting KubeChecks: v1.0.8-linux-amd64 a9adf64
10:40PM DBG building VCS to Application Map
10:40PM DBG Token Length - 40
10:40PM INF setting up hook handler path=/hooks
10:40PM INF hook handler setup complete path=/hooks projectPath=/github/project
10:40PM ??? ⇨ http server started on [::]:8080
10:40PM DBG Received hook request
10:40PM INF handling Github open, sync event from PR action=opened
10:40PM ERR could not load Github user email
10:40PM DBG git credentials set
10:40PM INF Repository cloned to: /tmp/kubechecks-mr-clone2133604070 project=argo-staging ref=test-kubechecker
10:40PM DBG Merging MR commit 0ed97d159c4268e7e3b98a04b61ac01047c2d94a into a tmp branch off of main for manifest generation...
10:40PM DBG Changed files: tools/argo/cd/apps/thirdparty/reloader.yaml event_id=21 repo=argo-staging
10:40PM DBG using an argocd matcher
10:40PM DBG looking for https://github.com/myorg/argo-staging.git repos
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1f19a3e]

goroutine 102 [running]:
github.com/zapier/kubechecks/pkg/app_directory.(*AppDirectory).Count(...)
	/src/pkg/app_directory/app_directory.go:31
github.com/zapier/kubechecks/pkg/affected_apps.NewArgocdMatcher({0xc000658240}, 0xc000ac22a0)
	/src/pkg/affected_apps/argocd_matcher.go:19 +0xbe
github.com/zapier/kubechecks/pkg/events.(*CheckEvent).GenerateListOfAffectedApps(0xc00067a500, {0x3aa0568, 0xc000cf8b10})
	/src/pkg/events/check.go:173 +0x218
github.com/zapier/kubechecks/pkg/server.(*VCSHookHandler).processCheckEvent(0xc000ff6880, {0x3aa04f8, 0xc000056040}, 0xc000ac22a0)
	/src/pkg/server/hook_handler.go:178 +0xc66
created by github.com/zapier/kubechecks/pkg/server.(*VCSHookHandler).groupHandler
	/src/pkg/server/hook_handler.go:113 +0x358

Ah, definitely an error, thanks for the report! We'll get that fixed up.

Fixed in v1.0.9, image should finish building shortly.