Add support for overriding the "version" field in the common ping format
Categories
(Toolkit :: Telemetry, enhancement, P1)
Tracking
()
People
(Reporter: mreid, Assigned: chutten)
References
Details
This is a band-aid to Bug 1453377, but would do the trick for currently-known use cases.
Longer term, we plan to move to using Glean, where everything will be wonderful.
Summing up a longer conversation on Slack:
- Add a new
aOptioncalledoverridePingVersionto specify a version here - read it in
assemblePingto fill in the top-levelversionfield - Have it default to
4as it currently does - Require it to be an int >= 4, otherwise error
- Leave the
?v=CONSTANTin the submission URL unchanged, verify that pings still flow through as expected
| Reporter | ||
Comment 1•6 years ago
|
||
The current workaround is to rename the ping's docType for incompatible changes. This is undesirable since it results in weirdly-named tables in the data lake.
For example, if we rename main pings to main_2, we would end up with corresponding tables named main_v4 and main_2_v4. Under the above proposal, we would report new pings with a version of 5 and end up with main_v4 and main_v5.
| Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Mark Reid [:mreid] from comment #0)
- Require it to be an int >= 4, otherwise error
This requirement is to make sure this check continues to work as expected.
| Assignee | ||
Comment 3•6 years ago
|
||
The version is reported in two places:
- The common ping format's
versionfield - A query string on the submission url (added here).
Adjusting #1 is actually fairly straightforward, technically speaking. There are corner cases to avoid, but we have some decent test coverage here.
#2 is much harder as the submission url is built at a time potentially much later than the ping is assembled.
We know that GCP ignores the query parameter. We need confirmation that AWS will do the right thing if there's a disagreement between #1 and #2 ("the right thing" here meaning "use the value from #1").
| Reporter | ||
Comment 4•6 years ago
|
||
It looks like the AWS pipeline wants the hard-coded value of v=4 in the submission URL. ni? :whd to confirm that this is still true in the "tee to GCP and AWS" world.
Based on reviewing the AWS Telemetry decoder, it appears that sourceVersion is indeed determined solely from the document contents, so disagreement between the version field inside the ping and the query string parameter should be fine.
We should still test it to make sure.
| Assignee | ||
Updated•6 years ago
|
Comment 5•6 years ago
|
||
(In reply to Mark Reid [:mreid] from comment #4)
It looks like the AWS pipeline wants the hard-coded value of
v=4in the submission URL. ni? :whd to confirm that this is still true in the "tee to GCP and AWS" world.
This is correct, that edge filter still applies to AWS ingestion and is also present in GCP. That filter could be changed to check that v != nil and achieve basically the same purpose (filter out v2 main pings).
From what I remember, v was introduced specifically to enable the above edge filtering and is unused downstream of the edge, as :mreid's analysis of the code suggests. Testing would indeed be prudent.
| Assignee | ||
Comment 6•6 years ago
|
||
So the option of changing the common ping version for just one doctype should work, but we'll of course need to write and run some tests.
Meanwhile, the option of changing the name of the doctype is still present and doesn't require us to repurpose a field designed to version the common ping format.
It might be the laziness and resistance to risky changes in me, but I'm still leaning towards changing the doctype name for incompatible schema changes. Mark, do you want to have a meeting about this so we can lay it all out and make a decision?
| Reporter | ||
Comment 7•6 years ago
|
||
That sounds good to me, will you schedule or shall I?
Comment 9•6 years ago
|
||
Here's an unsolicited comment with some historical background :)
The version of the common ping format is the version number of.. the telemetry ping format. At the beginning of "unified telemetry", this was used to distinguish between the "new" payload and the legacy one.
Bumping this version would be "weird": this is really a telemetry internal implementation detail, used by "internal pipeline stuff". IMHO the payload should not influence this version number.
With that said, I understand that the problem of schema incompatible changes that you're facing right now. Should we add some notes here why changing the ping name would not work in this case?
| Assignee | ||
Comment 10•6 years ago
|
||
Mark, Alessio, and I had a chat today about this.
We covered the things that don't make sense:
- Incrementing the common ping version to add a
payloadVersionor something is too heavy a lift on client and server given the use we'd get out of it. - Changing to a non-integral compound version would be worse.
- Putting the version number in the doctype name would result in datasets named like
sync_2_v4
This leaves us with two options:
- Change the doctype name meaningfully (e.g. how the "untrustedModules" ping became the "third-party-modules" ping)
- This does mean that older datasets will remain top-of-list. e.g. there will be a
untrusted_modulestable at the same level in the dataset hierarchy asthird_party_modules, and will continue to stay there for the foreseeable future. - But it doesn't require any changes to the client or the pipeline, and in the case that the non-backwards-compatible payload change actually does reflect a change in the collection, it actually makes sense.
- This does mean that older datasets will remain top-of-list. e.g. there will be a
- Allow custom pings to override the common ping version
- This would require a small amount of engineering on the client (add an option to
submitExternalPing, override inassemblePing) , and a lot of post-facto validation. But it shouldn't endanger traffic other than custom pings with custom versions.
- This would require a small amount of engineering on the client (add an option to
For now we agreed to leave #2 on the shelf and recommend #1 wherever possible. In the event that #1 doesn't make sense, we can reopen this bug (or file a new one) for the client engineering necessary to make this happen.
Description
•