Closed Bug 1826813 Opened 1 year ago Closed 1 year ago

[DNR] Short term workaround for telemetry test failure due to telemetry mirroring mapping issue in artifact build


(WebExtensions :: Request Handling, task, P2)



(firefox113 fixed)

113 Branch
Tracking Status
firefox113 --- fixed


(Reporter: rpl, Assigned: rpl)



(Whiteboard: [addons-jira])


(1 file)

Today's we noticed that the DNR xpcshell tests that are covering the DNR telemetry probes added in Bug 1803363 are failing consistently when executed on an artifact build, while they pass consistently in a full build (locally and also on autoland and non-artifact try pushes).

There are two issues being hit when running the DNR telemetry tests (included in test tasks part of test_ext_dnr_startup_cache.js, test_ext_dnr_dynamic_rules.js, test_ext_dnr_static_rules.js):

  • in a full build Object.keys(Glean.extensionsApisDnr) returned the array of the metrics names part of the extensions.apis.dnr category, but in an artifact build is returning an empty array. This issue can be easily fixed on the test helper side by trying to asserting that the metric property is defined without enumerating the Glean.extensionsApisDnr properties

  • in a full build the aMetricId received by the call to the GIFFT methods (e.g. GIFFT_TimingDistributionStart / GIFFT_TimingDistributionStopAndAccumulate for a timing distribution metric) matches the numeric id included in the map generated at build time part of HistogramGIFFTMap.h and so the call to mozilla::glean::HistogramIdForMetric(aMetricId) will return a defined mirrorId as expected, while in an artifact build the calls to the GIFFT methods will received a different aMetricId and so the call to mozilla::glean::HistogramIdForMetric will hit the default branch and returns Nothing(), and so the assertion on the mirrored metric would pass in a full build but fail in a artifact one.

  • Fixing the underlying issue in the telemetry internals is tracked by Bug 1826797.

  • in this bug we will have to opt for a short term workaround (e.g. restrict the execution of the assertions related to the mirrored telemetry to full builds, skip it temporarily in artifact builds)

  • :chutten suggests to use telemetry.fog.artifact_build to determine when the assertion on the mirrored telemetry should be skipped in the shorter term (which is also mentioned in firefox-source-docs here)

  • as part of a separate followup, which will depend on Bug 1826797, we would remove the short term workaround and let the assertions on mirrored telemetry to be executed also when running on artifact builds

Blocks: 1826817
Assignee: nobody → lgreco
Pushed by
Fix telemetry assertion failure hit by DNR xpcshell tests on artifact build. r=robwu
Severity: -- → N/A
Priority: -- → P2
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.