-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promtail: Fix excludepath not evaluated on newly added files (#9831)
**What this PR does / why we need it**: In promtail, when a file matching the exclude path is created in a directory that is being watched, this file should not be tailed by promtail. However, previously this was the case. As described in #7115. This change checks the filename to the excludePath and if it matches, ignores the file. **Which issue(s) this PR fixes**: Fixes #7115 **Special notes for your reviewer**: We tested manually this by running Promtail locally and creating a bunch of files which should and should not be tailed by Promtail. **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Tests updated - [x] `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/upgrading/_index.md`
- Loading branch information
1 parent
20d1fa6
commit 5e50ea0
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters