Repository navigation
fix(engine): parse metrics intervals as decimal - #4047
Conversation
|
Welcome @pedramsafaei! It looks like this is your first PR to falcosecurity/falco 🎉 |
|
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
Signed-off-by: Pedram Safaei <34566793+pedramsafaei@users.noreply.github.com>
11090cb to
2125db0
Compare
|
hey @leogr @sgaist could one of you take a look when you get a chance. it's a small fix so leading zeros in the metrics interval like 010s or 1h08m get read as decimal instead of octal. it doesn't change rules syntax or fields so i don't think it needs an engine version bump and the hold can probably be cancelled. thanks |
sgaist
left a comment
There was a problem hiding this comment.
LGTM but I would like a second opinion around the need for the engine version bump.
leogr
left a comment
There was a problem hiding this comment.
LGTM, thanks! No engine version bump is needed: this only corrects metrics.interval parsing, without changing rule syntax/loading or the engine checksum inputs.
|
LGTM label has been added. DetailsGit tree hash: 4c790765629242638097e265d0a7bdf226c8a322 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leogr, pedramsafaei The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
/kind bug
/area engine
/area tests
What changed
Prometheus duration components are now parsed as decimal values. Leading zeros no longer change the configured metrics interval.
Why
The parser accepts decimal digits but used automatic base detection. A leading zero could therefore make a duration parse as octal.
Before and after
010swas read as 8 seconds. It is now read as 10 seconds.1h08mwas read as 1 hour. It is now read as 1 hour 8 minutes.Testing
Added regression coverage for zero padded milliseconds, seconds, minutes, and combined durations. All 266 Falco unit tests pass.
Limits
Very large duration components can still exceed uint64. This change does not alter existing overflow handling.
Release note