git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] trace2: increment event format version

From
Josh Steadmon <steadmon@google.com>
Date
Dec 1, 2021, 19:56 UTC
Message-ID
<YafTgiNl53FeWH+Q@google.com>
In-Reply-To
<211201.86zgpk9u3t.gmgdl@evledraar.gmail.com>
On 2021.12.01 16:57, Ævar Arnfjörð Bjarmason wrote:
Show 38 quoted lines
> [...]
>
> IOW I think this would make more sense as a version bumping criteria:
> 
>     The version should be incremented whenever an existing consumer of
>     trace2 data might want to act differently based on the new data.
> 
>     An exception to this is that any new event types do not merit
>     bumping the version number. E.g. we have a top-level event type
>     "error" now, but might hypothetically add a new "warning" type.
>     Such an addition won't require bumping the version.
> 
>     Likewise adding new mandatory fields to existing events doesn't
>     require bumping the version. E.g. the "error" type has (as of
>     writing) a "fmt" and "msg" field. Let's say a future version adds an
>     "id" (as in unique id for the error) field, such an addition won't
>     require bumping the version.
> 
>     In other words, consumers of the trace2 JSON format are expected to
>     walk the structure and only pick those things that they know about.
>     Any unknown fields the consumer doesn't know about can be safely
>     discarded. This won't apply if the version is bumped, then all bets
>     are off, and the meaning of existing fields may or may not have
>     changed.
> 
>     The idea is to encourage additive changes over changes to existing
>     fields, and to reduce the work in maintaining the consumers of the
>     format.
> 
>     As long as consumers ignore new unknown data they won't need to
>     be updated every time the format changes in any way, only for
>     potentially backwards-incompatible changes.
> 
> Wouldn't this be a saner policy for version bumping? AFAICT the only
> thing you wouldn't be getting that you're getting now is the trivial
> optimization of being able to say cheaply route trace2 payloads based on
> version number alone (but even that is iffy now due to the subjectivity
> of "significant change").
No objections from me, this sounds like a good improvement.
Previous: Ævar Arnfjörð Bjarmason
Message 9 of 9 in “trace2: increment event format version”
  1. trace2: increment event format versionJosh Steadmon, Nov 11, 2021
  2. Junio C HamanoNov 11, 2021
  3. Josh SteadmonNov 11, 2021
  4. Junio C HamanoNov 11, 2021
  5. Ævar Arnfjörð BjarmasonNov 12, 2021
  6. Junio C HamanoNov 12, 2021
  7. Jeff HostetlerDec 1, 2021
  8. Ævar Arnfjörð BjarmasonDec 1, 2021
  9. Josh SteadmonDec 1, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.