Closed Bug 1965481 Opened 1 year ago Closed 1 month ago

Why do `object` metrics store and return [] in artifact builds, but not in full builds?

Categories

(Toolkit :: Telemetry, task, P4)

task

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: chutten, Assigned: Kayano04)

References

Details

(Whiteboard: [affects-thunderbird-treeherder])

Attachments

(1 external file)

In bug 1965309 we learned that artifact builds will store and return [] for array-type members of object metrics, but full builds will just not bother returning them.

Why?

And should we change this behaviour so it is consistent?

Severity: -- → N/A
Priority: -- → P4

See also how it's sometimes null and sometimes undefined per bug 2062871

See Also: → 2062871
Whiteboard: [affects-thunderbird-treeherder]
See Also: → 2073057

I'll work on this.

Full builds serialize object metrics through generated Rust types that omit null and empty array object members, whereas RuntimeObject used to retain raw JSON

Fix: normalize RuntimeObject at serialization before storage, recursively dropping only object members whose values are null or empty arrays; retain root empty arrays, empty objects, all array elements, false, zero and empty strings
No new schema validation and no changes to rust.jinja2/full-build semantics
Updated test_Glean.js and test_JOG.js, removing old artifact-only expectations in test_BHRObserver.js and TelemetryEnvironmentTesting.sys.mjs

Assignee: nobody → Kayano04
Status: NEW → ASSIGNED

Hi chutten — a quick note here since Phabricator itself is unreachable for me right now: for the past few days every request to phabricator.services.mozilla.com from my network has returned HTTP 406, so I haven't been able to post my replies to your two inline comments on D333957. They are written, and the new diff (1415013) already addresses both points — the delay is purely the access problem. I'll post the replies on Phabricator as soon as I can get in, or I can paste them here in full if that's easier. Apologies for the delay.

Sorry about that, Phabricator needed to go quiet for a spell in order to deal with the php2shell thing. It should be up again now.

Pushed by chutten@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/68ba7f72291a https://hg.mozilla.org/integration/autoland/rev/6d62085d4d76 Normalize Glean RuntimeObject serialization by omitting null and empty array members r=chutten
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: