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 panic with assertion when the value of the output fields are nil … #429

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

Issif
Copy link
Member

@Issif Issif commented Mar 23, 2023

…and not interface{}

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area config

/area outputs

/area tests

What this PR does / why we need it:

fix panic with assertion when the value of the output fields are nil and not interface{}

2023/03/23 13:30:43 http: panic serving 127.0.0.1:45414: interface conversion: interface {} is nil, not string
goroutine 74183 [running]:
net/http.(*conn).serve.func1()
	$GOROOT/src/net/http/server.go:1854 +0xbf
panic({0x21f5840, 0xc000a163c0})
	$GOROOT/src/runtime/panic.go:890 +0x263
main.newFalcoPayload({0x7f2a4bdee318?, 0xc0006d8200})
	/home/runner/work/falcosidekick/falcosidekick/handlers.go:107 +0x1509
main.mainHandler({0x2b1d0f0, 0xc0001b28c0}, 0xc000564200)
	/home/runner/work/falcosidekick/falcosidekick/handlers.go:43 +0x286
net/http.HandlerFunc.ServeHTTP(0xc0001b28c0?, {0x2b1d0f0?, 0xc0001b28c0?}, 0x2572cf4?)
	$GOROOT/src/net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0x2b1d0f0, 0xc0001b28c0}, 0xc000564200)
	$GOROOT/src/net/http/server.go:2500 +0x149
net/http.serverHandler.ServeHTTP({0x2b0e708?}, {0x2b1d0f0, 0xc0001b28c0}, 0xc000564200)
	$GOROOT/src/net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0001361b0, {0x2b1e178, 0xc0007a8b10})
	$GOROOT/src/net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	$GOROOT/src/net/http/server.go:3089 +0x5ed

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

…and not interface{}

Signed-off-by: Thomas Labarussias <issif_github@gadz.org>
@Issif Issif added this to the 2.28.0 milestone Mar 23, 2023
@poiana poiana requested review from cpanato and leogr March 23, 2023 14:24
@poiana
Copy link

poiana commented Mar 23, 2023

LGTM label has been added.

Git tree hash: 23eac26418d6aad7d1ca4c99e698e4c3cbf7c313

@poiana
Copy link

poiana commented Mar 23, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fjogeleit, Issif

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit a4e9e10 into master Mar 23, 2023
@poiana poiana deleted the fix-panic-k8s-name-pod branch March 23, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants