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

compiler guarantees for logql exprs #1626

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Feb 4, 2020

This PR ensures that the logql.Expr interface is not implemented accidentally. This is helpful for understanding its source code and will generate compiler errors if a noncompliant type is used as an Expr, which will gives us more assurance in the safety of our code moving forward.

@codecov-io
Copy link

Codecov Report

Merging #1626 into master will decrease coverage by 0.09%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1626     +/-   ##
=========================================
- Coverage   60.95%   60.86%   -0.1%     
=========================================
  Files         108      108             
  Lines        8144     8148      +4     
=========================================
- Hits         4964     4959      -5     
- Misses       2790     2796      +6     
- Partials      390      393      +3
Impacted Files Coverage Δ
pkg/logql/ast.go 81.81% <0%> (-2.56%) ⬇️
pkg/promtail/targets/filetarget.go 68.71% <0%> (-1.85%) ⬇️
pkg/logql/evaluator.go 91.75% <0%> (-1.04%) ⬇️
pkg/promtail/targets/tailer.go 73.56% <0%> (ø) ⬆️

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit 1773900 into grafana:master Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants