mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 09:47:56 -05:00
* fix(ec2): deliver flow log records in the format the flow log declares
record took no format argument and emitted all 29 available fields in
alphabetical order every time. Only the header line varied, so a flow log
created with a six field LogFormat wrote a six field header above 29 field
rows, and a reader following that header took the wrong value for every
column.
The field list now reaches record, which resolves a value per token. A field
this emulator carries no value for keeps its column and reads "-", since
dropping it would shift every later value one place left against the header
the caller asked for.
A flow log with no LogFormat delivers the version 2 fields in the documented
order rather than the alphabetised superset. The version a record reports is
now the highest its selected fields belong to, in place of a fixed 5.
* fix(ec2): keep every LogFormat token, whatever its spelling
The token pattern matched lowercase names only, so a format naming ${DSTADDR}
lost that column from the header and every row. Any non-blank token now holds
its column and reads "-" when there is no value for it.
A field outside the version table counts as the highest version that table
defines rather than the lowest. The table is complete through version 5, so an
unlisted field belongs to a later one, and calling it version 2 labelled a
record that plainly was not one.
Row assertions go through a helper that fails on a delivery carrying only a
header, so none of them can pass without seeing a record.