Closed Bug 1668279 Opened 1 year ago Closed 1 year ago

Ensure that changing metrics.yaml cause a rebuild

Categories

(Toolkit :: Telemetry, task, P1)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: janerik, Assigned: chutten)

References

Details

(Whiteboard: [telemetry:fog:m?])

Attachments

(1 file)

Right now our moz.build only lists a dependency on the metrics_index.py, which itself contains paths to metrics.yaml files.

Changing any of those files should trigger a rebuild of the generated files.
However the build system doesn't see that dependency so doesn't pick it up.

We should find a way to let the build system know of that dependency, either by moving contents of metrics_index.py into moz.build, parsing that file inside moz.build to make dependencies clear or some other way of letting the build system know.

Whiteboard: telemetry:fog:m? → [telemetry:fog:m?]
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Priority: P3 → P1

Turns out that metrics_index.py is not only valid Python but is also valid
mozbuild format. So long as our constants are lowercase (uppercase is reserved)
we can include() the index and read the arrays of files to tell
GeneratedFile every file it depends on, not just the index.

We do have to transform the paths, though, as I still maintain that paths
relative to TOPSRCDIR makes more sense for the index, but the inputs to
GeneratedFile are relative to the dir of the moz.build.

Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f034e46b9723
Generate metrics code when any metrics definition file changes r=janerik

Huh. Well that was weird. It didn't come up in testing because there were no metrics. And now that there are, the testing strategy of "It doesn't even build" is starting to work : D

Midair collision, already pushed a fix.

Flags: needinfo?(chutten)
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c47b32d60be1
Generate metrics code when any metrics definition file changes r=janerik

Oh poo. I see it now. Thank you.

Flags: needinfo?(chutten)
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f63a01c189ea
Generate metrics code when any metrics definition file changes r=janerik
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Regressions: 1669413
You need to log in before you can comment on or make changes to this bug.