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
Copy Markdown
Contributor

Signed-off-by: Harkishen-Singh [email protected]

fixes #6065

eg-query

Signed-off-by: Harkishen-Singh <[email protected]>
@juliusv
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@juliusv sure. Thanks for the suggestion.

@harkishen
Copy link
Copy Markdown
Contributor Author

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

@brian-brazil
Copy link
Copy Markdown
Contributor

This should have unittests.

Signed-off-by: Harkishen-Singh <[email protected]>
@harkishen
Copy link
Copy Markdown
Contributor Author

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

Signed-off-by: Harkishen-Singh <[email protected]>
@brian-brazil
Copy link
Copy Markdown
Contributor

👍

@juliusv
Copy link
Copy Markdown
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