Skip to content

Commit

Permalink
fix: use ISO 8601 year number (#2621)
Browse files Browse the repository at this point in the history
## Description
The Vector logs aggregator output `%Y` specifier for year which is the
[proleptic Gregorian
year](https://docs.rs/chrono/0.4.19/chrono/format/strftime/index.html#specifiers)
instead of `%G` specifier the ISO 8601. Logs are read with the ISO
format so this created a mismatch in logs being read / written at the
end of 2024 (eg. `Y` output the year 2024 on Dec. 30th 2024 whereas the
ISO 8601 year on that date is 2025)

## Is this change user facing?
NO
  • Loading branch information
tedim52 authored Jan 2, 2025
1 parent 555b1bc commit 97324e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
// We instruct vector to store log files per-year, per-week (00-53), per-enclave, per-service
// To construct the filepath, we utilize vectors template syntax that allows us to reference fields in log events
// https://vector.dev/docs/reference/configuration/template-syntax/
baseLogsFilepath = "\"" + logsStorageDirpath + "%%Y/%%V/"
baseLogsFilepath = "\"" + logsStorageDirpath + "%%G/%%V/"

uuidLogsFilepath = baseLogsFilepath + "{{ enclave_uuid }}/{{ service_uuid }}.json\""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestCopyValueTuple(t *testing.T) {
valueCopy, err := DeepCopyArgumentValue(value)
require.NoError(t, err)
require.Equal(t, valueCopy, value)
require.NotSame(t, valueCopy, value)
require.NotSame(t, &valueCopy, &value)
}

func TestCopyValueDict(t *testing.T) {
Expand Down

0 comments on commit 97324e8

Please sign in to comment.