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

Querier/Ruler: query blocker #7785

Merged
merged 5 commits into from
Nov 28, 2022

Conversation

dannykopping
Copy link
Contributor

@dannykopping dannykopping commented Nov 28, 2022

What this PR does / why we need it:
Block malicious or expensive queries using a per-tenant runtime configuration.

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:
This does not apply to labels or series queries, nor does it allow for defining other dimensions like query time range. I wanted to keep things simple to start with.

Checklist

  • Reviewed the CONTRIBUTING.md guide
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

Danny Kopping added 2 commits November 27, 2022 22:43
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping requested a review from a team as a code owner November 28, 2022 06:44
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Nov 28, 2022
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Copy link
Collaborator

@periklis periklis left a comment

Choose a reason for hiding this comment

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

Looks good to me, blocked as naming seems a bit weird. Usually folks skim though pairs like allow/deny lists

docs/sources/operations/blocking-queries.md Show resolved Hide resolved
pkg/logql/blocker.go Show resolved Hide resolved
Copy link
Contributor

@chaudum chaudum left a comment

Choose a reason for hiding this comment

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

Really nice addition to control query execution.

Danny Kopping added 2 commits November 28, 2022 09:56
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-target-branch/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0.4%
+               loki	0%

@dannykopping dannykopping merged commit a63ad06 into grafana:main Nov 28, 2022
@dannykopping dannykopping deleted the dannykopping/query-block branch November 28, 2022 08:13
dannykopping pushed a commit to dannykopping/loki that referenced this pull request Nov 28, 2022
Block malicious or expensive queries using a per-tenant runtime configuration.
dannykopping pushed a commit that referenced this pull request Nov 28, 2022
Abuelodelanada pushed a commit to canonical/loki that referenced this pull request Dec 1, 2022
Block malicious or expensive queries using a per-tenant runtime configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants