Closed Bug 1654339 Opened 5 years ago Closed 5 years ago

glean_parser should generate Autodocs for FOG

Categories

(Toolkit :: Telemetry, task, P2)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

Details

(Whiteboard: [telemetry:fog:m5])

Attachments

(1 file)

glean_parser can output markdown which can be included in the FOG in-tree documentation... if we can find some way to do it.

The current forerunner for doing this properly is to convince Sphinx or mach doc to generate the autodocs as part of the doctree build (the docs schedule in mozbuild). This will ensure they fit nicely into existing workflows and we will always publish the most up-to-date version.

(Though it does mean that autodocs will not be present in the m-c checkout.)

We need to have public and complete documentation before we can check in data collections in-tree (otherwise we'll fail Data Review), so this needs to be done before bug 1651110 can start collecting validation information. (( Or it will have to manually generate the autodocs and check them in temporarily while we figure this out ))

Options that have already been considered and dropped include:

  • Having mach build generate the docs in the source dir for inclusion in the m-c source tree.
    • Dropped because mach build does not and should not generate artefacts in the source tree.
  • Adding a linter to detect when the docs need to be updated, forcing the user to run the autodocs generation manually when adding/changing metrics.
    • Dropped because of insufficient magic.
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Priority: P2 → P1
Depends on: 1655056

The specific requirements for this are for mach doc to

from glean_parser import translate
translate.translate([Path(x) for x in GLEAN_METRICS_AND_PINGS_FILES], 'markdown', Path('toolkit/components/glean/docs'), {'project_title': 'Firefox Desktop'})

To do this GLEAN_METRICS_AND_PINGS_FILES must be an iterable that mach doc can find. That list (which will be composed of GLEAN_METRICS_FILES and GLEAN_PINGS_FILES which will live in toolkit/components/glean/moz.build) needs to get from fog's moz.build to mach doc somehow. My guess is that we can probably communicate it somehow similar to how SPHINX_TREES does it, but I don't know what magic glue we might have to write in order to make that happen.

My work on this bug is somewhat hampered by my not being able to run mach doc, so I'm gonna unassign this pending bug 1655056's resolution.

Assignee: chutten → nobody
Status: ASSIGNED → NEW
Priority: P1 → P2
Blocks: 1658359
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/def563fc3dea Add Glean metrics autodocs to moztreedocs r=janerik,ahal
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: