Closed Bug 1486807 Opened 6 years ago Closed 9 months ago

Change parse_histograms.py to have the histogram_allowlist as input

Categories

(Toolkit :: Telemetry, enhancement, P5)

enhancement
Points:
2

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox63 --- affected

People

(Reporter: Dexter, Unassigned)

References

(Blocks 1 open bug)

Details

We should investigate if we can change parse_histograms.py (and adjust the build system accordingly) in order to apss the path to the histogram_whitelist.json file at build time, rather than hardcoding its path in the code.
Blocks: 1201022
Setup as mentored!
Points: --- → 2
Flags: needinfo?(alessio.placitelli)
Priority: -- → P3
Hi :gps!

Is there any way to get the path to the directory the moz.build file lives in from the build system?
We're currently somehow hardcoding the path to the 'histogram-whitelist.json' file at [1], but we really want to move away from that and take the path to that file as an input to the python script.
The files lives at the same level of the moz.build file, in the toolkit/components/telemetry module root.

[1] - https://searchfox.org/mozilla-central/rev/a41fd8cb947266ea2e3f463fc6e31c88bfab9d41/toolkit/components/telemetry/build_scripts/parsers/parse_histograms.py#105
Flags: needinfo?(gps)
From within moz.build files, SRCDIR (https://firefox-source-docs.mozilla.org/build/buildsystem/mozbuild-symbols.html#srcdir) defines the directory where the moz.build file is. There's also TOPSRCDIR and RELATIVEDIR.

If you are in a Python script invoked by the build system, `import buildconfig` and use `buildconfig.topsrcdir` to get the path to the source directory, for example. This module is defined by build/buildconfig.py and essentially re-exports symbols that allow you to access the build configuration.
Flags: needinfo?(gps)

Clearing ni? and putting this up for triage again, I won't be able to tackle it.

Flags: needinfo?(alessio.placitelli)
Priority: P3 → --
Summary: Change parse_histograms.py to have the histogram_whitelist as input → Change parse_histograms.py to have the histogram_allowlist as input
Priority: -- → P5
Severity: normal → S3

We're unlikely to take this on at this juncture.

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.