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

fix(operator): Fix encoding of blocked query pattern in configuration #12097

Merged
merged 15 commits into from Mar 5, 2024

Conversation

btaani
Copy link
Contributor

@btaani btaani commented Feb 29, 2024

What this PR does / why we need it:
Prior to this PR, when LokiStack is configured to block queries with a regex pattern, user could still query logs even when they satisfy the regex pattern. This PR fixes the way that the function yamlBlock handles the pattern so that regex works.

Which issue(s) this PR fixes:
Fixes LOG-4927

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@btaani btaani marked this pull request as ready for review February 29, 2024 13:21
@btaani btaani requested review from periklis, xperimental and a team as code owners February 29, 2024 13:21
@pull-request-size pull-request-size bot added size/S and removed size/M labels Feb 29, 2024
@pull-request-size pull-request-size bot added size/M and removed size/S labels Feb 29, 2024
@pull-request-size pull-request-size bot added size/S and removed size/M labels Feb 29, 2024
btaani and others added 2 commits February 29, 2024 17:47
@xperimental xperimental changed the title operator: fix blocking query yaml block fix(operator): Pass blocked query pattern as YAML string Feb 29, 2024
@xperimental xperimental changed the title fix(operator): Pass blocked query pattern as YAML string fix(operator): Fix encoding of blocked query pattern in configuration Feb 29, 2024
Copy link
Collaborator

@xperimental xperimental left a comment

Choose a reason for hiding this comment

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

Seems to work fine during tests. One thing occurred to me, that we might be able to fix in-passing while we are at this spot (see comment).

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 4, 2024
@xperimental xperimental enabled auto-merge (squash) March 5, 2024 17:11
Copy link
Collaborator

@xperimental xperimental left a comment

Choose a reason for hiding this comment

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

Just tested with a few blocks, seems to work fine 👍

@xperimental xperimental merged commit 9fdb810 into grafana:main Mar 5, 2024
17 of 18 checks passed
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
…grafana#12097)

Co-authored-by: Robert Jacob <rojacob@redhat.com>
Co-authored-by: Periklis Tsirakidis <periklis@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants