Skip to content
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

fix: handle nil ptr error for empty kubeconfig #975

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

yashmehrotra
Copy link
Member

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x87369e1]

goroutine 135 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:115 +0x1e5
panic({0x908ebc0?, 0xe27ef80?})
	/usr/local/go/src/runtime/panic.go:770 +0x132
github.com/flanksource/config-db/scrapers/kubernetes.(*SharedInformerManager).getOrCreate(0xe57c080, {{{{0xad06b40, 0xc00a73d650}, {0xad3d7f0, 0xc000b2c690}, 0x9f817a0, 0x9f817a8, {0xac81ce0, 0xc00045edf0}}}, 0xc005596fa8, ...}, ...)
	/app/scrapers/kubernetes/informers.go:111 +0x141
github.com/flanksource/config-db/scrapers/kubernetes.(*SharedInformerManager).Register(0x100000009c45a5e?, {{{{0xad06b40, 0xc00a73d650}, {0xad3d7f0, 0xc000b2c690}, 0x9f817a0, 0x9f817a8, {0xac81ce0, 0xc00045edf0}}}, 0xc005596fa8, ...}, ...)
	/app/scrapers/kubernetes/informers.go:42 +0xaa
github.com/flanksource/config-db/scrapers/kubernetes.WatchResources({{{{0xad06b40, 0xc00a73d650}, {0xad3d7f0, 0xc000b2c690}, 0x9f817a0, 0x9f817a8, {0xac81ce0, 0xc00045edf0}}}, 0xc005596fa8, {0x0, ...}, ...}, ...)
	/app/scrapers/kubernetes/events_watch.go:70 +0x5f8
github.com/flanksource/config-db/scrapers.scheduleScraperJob({{{{0xad06b40, 0xc00a73d650}, {0xad3d7f0, 0xc000b2c690}, 0x9f817a0, 0x9f817a8, {0xac81ce0, 0xc00045edf0}}}, 0xc005596fa8, {0x0, ...}, ...})
	/app/scrapers/cron.go:241 +0x4f8
github.com/flanksource/config-db/scrapers.SyncScrapeJob({{{{0xad06b40, 0xc00a73d650}, {0xad3d7f0, 0xc000b2c690}, 0x9f817a0, 0x9f817a8, {0xac81ce0, 0xc00045edf0}}}, 0xc005596fa8, {0x0, ...}, ...})

@moshloop moshloop merged commit 0d9a726 into main Sep 19, 2024
8 checks passed
@moshloop moshloop deleted the handle-nil-ptr-error branch September 19, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants