Skip to content

Commit

Permalink
rule: fix skips rule files based on their names. (thanos-io#4232)
Browse files Browse the repository at this point in the history
Signed-off-by: weidai218169 <weidai218169@sohu-inc.com>
  • Loading branch information
weidai218169 committed Jul 20, 2021
1 parent 0058003 commit e48c30f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
### Fixed

- [#4442](https://github.com/thanos-io/thanos/pull/4442) rule: fix reload signal not working
- [#4232](https://github.com/thanos-io/thanos/issues/4232) rule: fix skips rule files based on their names.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion pkg/rules/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func (m *Manager) Update(evalInterval time.Duration, files []string) error {

// Use full file name appending to work dir, so we can differentiate between different dirs and same filenames(!).
// This will be also used as key for file group name.
newFn := filepath.Join(m.workDir, s.String(), strings.TrimLeft(fn, m.workDir))
newFn := filepath.Join(m.workDir, s.String(), filepath.Base(fn))
if err := os.MkdirAll(filepath.Dir(newFn), os.ModePerm); err != nil {
errs.Add(errors.Wrapf(err, "create %s", filepath.Dir(newFn)))
continue
Expand Down

0 comments on commit e48c30f

Please sign in to comment.