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

Problems with setting web.route-prefix #2207

Closed
pgier opened this issue Mar 2, 2020 · 0 comments · Fixed by #2208
Closed

Problems with setting web.route-prefix #2207

pgier opened this issue Mar 2, 2020 · 0 comments · Fixed by #2208

Comments

@pgier
Copy link
Contributor

pgier commented Mar 2, 2020

Thanos, Prometheus and Golang version used:
latest master (close to v0.11.0)

thanos, version 0.10.1-dev (branch: master, revision: 92c4470)
build user: pgier@pgier-laptop
build date: 20200301-00:40:46
go version: go1.13

What happened:

I set the web.route-prefix to / and this caused a redirect loop in the web interface.
Also, I tried setting a web.route-prefix without a leading / and this causes an error.

What you expected to happen:
Setting the web.route-prefix to / should have the same behaviour as the default setting of empty string.
Setting a prefix without a leading slash should either provide a cleaner input validation message or just automatically prepend a slash.

How to reproduce it (as minimally and precisely as possible):

./thanos query --web.route-prefix="/"
./thanos query --web.route-prefix="foo"
pgier added a commit to pgier/prometheus-operator that referenced this issue Mar 2, 2020
Due to a problem in the way thanos handles a web.route-prefix set
to '/' (thanos-io/thanos#2207), the value
 should only set if the user has set a value for it.  If it's set
to empty string, no argument should be passed, so that thanos
uses it's own default value.
pgier added a commit to pgier/prometheus-operator that referenced this issue Mar 2, 2020
Due to a problem in the way thanos handles a web.route-prefix set
to '/' (thanos-io/thanos#2207), the value
 should only set if the user has set a value for it.  If it's set
to empty string, no argument should be passed, so that thanos
uses it's own default value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants