Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPanic when using empty relabel config #4889
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks for the report, looking into it! |
This comment has been minimized.
This comment has been minimized.
|
https://github.com/prometheus/prometheus/blob/master/relabel/relabel.go#L41 accesses |
simonpasquier
added
kind/bug
component/config
labels
Nov 21, 2018
This comment has been minimized.
This comment has been minimized.
|
I would lean towards rejecting any empty relabeling rule at load time since it isn't a useful configuration AFAICT. |
This comment has been minimized.
This comment has been minimized.
|
@simonpasquier Good point, that would be even better :) |
This comment has been minimized.
This comment has been minimized.
|
I am interested in working on this! |
This comment has been minimized.
This comment has been minimized.
|
@infoverload go ahead! |
This comment has been minimized.
This comment has been minimized.
|
Heads-up: I'm fixing all the slice-of-pointers config |
xocasdashdash commentedNov 20, 2018
Bug Report
What did you do?
I added an empty relabel config like so:
What did you expect to see?
Prometheus not to panic.
What did you see instead? Under which circumstances?
It panics. ie: https://imgur.com/a/aFSiz5V
Environment
Linux 3.10.0-862.el7.x86_64 x86_64
Prometheus version:
prometheus, version 2.5.0 (branch: HEAD, revision: 67dc912)
build user: root@578ab108d0b9
build date: 20181106-11:40:44
go version: go1.11.1
I also found this bug on 2.4.3