Skip to content

fixes space issue in duration range promql#6295

Merged
juliusv merged 6 commits intoprometheus:masterfrom
harkishen:graph-issue-1
Nov 11, 2019
Merged

fixes space issue in duration range promql#6295
juliusv merged 6 commits intoprometheus:masterfrom
harkishen:graph-issue-1

Conversation

@harkishen
Copy link
Contributor

Signed-off-by: Harkishen-Singh harkishensingh@hotmail.com

fixes #6065

eg-query

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
@juliusv
Copy link
Member

juliusv commented Nov 9, 2019

@Harkishen-Singh Thanks! Rather than removing spaces from the duration token in the parser, it would be better to fix the lexer to just skip spaces (like it does in other places, e.g. https://github.com/prometheus/prometheus/blob/master/promql/lex.go#L578-L579) and just emit the actual duration string as the token.

@harkishen
Copy link
Contributor Author

@juliusv sure. Thanks for the suggestion.

@harkishen
Copy link
Contributor Author

@juliusv I have updated the lexer to skip over the spaces. Please have a look.

@brian-brazil
Copy link
Contributor

This should have unittests.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
@harkishen
Copy link
Contributor Author

@brian-brazil @juliusv added unit tests. please have a look.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
@brian-brazil
Copy link
Contributor

👍

@juliusv
Copy link
Member

juliusv commented Nov 11, 2019

👍 Thanks!

@juliusv juliusv merged commit 37d6669 into prometheus:master Nov 11, 2019
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.

promql: Parser bug: Prometheus does not accept spaces after opening brace in subquery.

3 participants