Skip to content

Commit

Permalink
Merge branch 'dev' (0.5.2-1)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabalde committed Feb 12, 2025
2 parents 6544135 + c669f6f commit 34689b5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
- 0.5.2-1 (2025-02-12):
+ Improved logrotate configuration.
+ Fixed DuckDB query when normalizing input `from` and `to` timestamps.

- 0.5.1-1 (2025-02-12):
+ Updated dependencies.
* Go 1.23.5 ➙ 1.24.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SHELL := /bin/bash
ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
UMASK := 022

VERSION := 0.5.1
VERSION := 0.5.2
ITERATION := 1
REVISION := $(shell cd '$(ROOT)' && git rev-parse --short HEAD)
ENVIRONMENT ?= production
Expand Down
4 changes: 2 additions & 2 deletions extras/packaging/debian/varnishmon.logrotate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/var/log/varnishmon/*.log
/var/lib/varnishmon/*.db {
/var/log/varnishmon/varnishmon.log
/var/lib/varnishmon/varnishmon.db {
daily
rotate 7
compress
Expand Down
4 changes: 2 additions & 2 deletions extras/packaging/redhat/varnishmon.logrotate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/var/log/varnishmon/*.log
/var/lib/varnishmon/*.db {
/var/log/varnishmon/varnishmon.log
/var/lib/varnishmon/varnishmon.db {
daily
rotate 7
compress
Expand Down
6 changes: 3 additions & 3 deletions pkg/workers/storage/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ func (stg *Storage) unsafeNormalizeFromToAndStep(
// this job to ensure consistency.
row := stg.db.QueryRow(fmt.Sprintf(`
SELECT
time_bucket(INTERVAL '%ds', $1) AS from,
time_bucket(INTERVAL '%ds', $2) + INTERVAL '%ds' AS to`,
step, step, step), from, to)
time_bucket(INTERVAL '%ds', $1::TIMESTAMP) AS from,
time_bucket(INTERVAL '%ds', $2::TIMESTAMP) + INTERVAL '%ds' AS to`,
step, step, step), from.Format(time.RFC3339), to.Format(time.RFC3339))
if err := row.Scan(&from, &to); err != nil {
return time.Time{}, time.Time{}, 0, fmt.Errorf("failed to scan row with normalized boundaries: %w", err)
}
Expand Down

0 comments on commit 34689b5

Please sign in to comment.