Skip to content

Kibana backend: Panic on no result? #35

@mumoshu

Description

@mumoshu

Hi. First of all, thank you so much for sharing a great tool 👍

I just ran ax against an empty es index behind Kibana innocently, and it panicked like:

$ ax
Querying index circleci-builds
panic: runtime error: index out of range

goroutine 19 [running]:
github.com/egnyte/ax/pkg/backend/kibana.(*Client).queryMessages(0xc420253320, 0x18c9540, 0xc420085c40, 0xc420039610, 0xf, 0x1804218, 0x0, 0x0, 0xc42028a000, 0x0, ...)
	/Users/romanlevin/go/src/github.com/egnyte/ax/pkg/backend/kibana/query.go:136 +0x1ce9
github.com/egnyte/ax/pkg/backend/kibana.(*Client).querySubIndex(0xc420253320, 0x18c9540, 0xc420085c40, 0xc420039610, 0xf, 0x1804218, 0x0, 0x0, 0xc42028a000, 0x0, ...)
	/Users/romanlevin/go/src/github.com/egnyte/ax/pkg/backend/kibana/query.go:190 +0x97
github.com/egnyte/ax/pkg/backend/kibana.(*Client).Query.func1(0xc420253320, 0x18c9540, 0xc420085c40, 0xc420286000, 0xc420288000)
	/Users/romanlevin/go/src/github.com/egnyte/ax/pkg/backend/kibana/query.go:164 +0x127
created by github.com/egnyte/ax/pkg/backend/kibana.(*Client).Query
	/Users/romanlevin/go/src/github.com/egnyte/ax/pkg/backend/kibana/query.go:161 +0x16b

Perhaps we aren't correctly handling the case here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions