Handle Text and Log marker payloads with their marker schema - #6247
Open
canova wants to merge 1 commit into
Open
Handle Text and Log marker payloads with their marker schema#6247canova wants to merge 1 commit into
canova wants to merge 1 commit into
Conversation
Firefox now outputs the Text marker's `name` and the Log marker's `message` as unique strings, so the payload holds a string table index instead of the text itself. The two Text marker PII sanitizers and the MOZ_LOG formatting read those fields directly and threw an error. This patch fixes these issues by always looking at the marker schema and not having any arbitrary assumptions about some certain marker types. It was a bad idea to have these custom handlings in the past instead of relying on the marker schema in the first place.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6247 +/- ##
==========================================
+ Coverage 83.69% 83.84% +0.14%
==========================================
Files 348 348
Lines 37433 37457 +24
Branches 10514 10523 +9
==========================================
+ Hits 31330 31405 +75
+ Misses 5676 5625 -51
Partials 427 427 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fatadel
reviewed
Aug 7, 2026
mstange
reviewed
Aug 7, 2026
Comment on lines
+694
to
+695
| for (const field of markerSchema.fields) { | ||
| if (field.key === fieldKey) { |
Contributor
There was a problem hiding this comment.
This will iterate the schema fields for every sanitized text marker. In other places we precompute the string index fields per marker type, could we use the precomputed map instead?
mstange
reviewed
Aug 7, 2026
| ): string | null { | ||
| if ('message' in data) { | ||
| if (!data.message) { | ||
| const message = resolveLogMarkerMessage(data.message, stringArray); |
Contributor
There was a problem hiding this comment.
So here we check the payload whereas in the other place we check the schema. Should we check the schema here too?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main | Deploy preview
Fixes #6245
Firefox now outputs the Text marker's
nameand the Log marker'smessageas unique strings, so the payload holds a string table index instead of the text itself. The two Text marker PII sanitizers and the MOZ_LOG formatting read those fields directly and threw an error.This patch fixes these issues by always looking at the marker schema and not having any arbitrary assumptions about some certain marker types. It was a bad idea to have these custom handlings in the past instead of relying on the marker schema in the first place.