<div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 24, 2017 at 11:59 AM, Gregory Szorc <span dir="ltr"><<a href="mailto:gps@mozilla.com" target="_blank">gps@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Freshly landed in bug 1411343, CI now produces JSON files containing info about how source files map to Bugzilla components.<br></div><div><br></div><div>You'll notice a new "Bugzilla" task in Treeherder. It will write some artifacts to the "source/source-bugzilla-info" TC Index route. e.g. <a href="https://tools.taskcluster.net/index/artifacts/gecko.v2.autoland.pushlog-id.53952.source/source-bugzilla-info" target="_blank">https://tools.taskcluster.net/<wbr>index/artifacts/gecko.v2.autol<wbr>and.pushlog-id.53952.source/<wbr>source-bugzilla-info</a>.</div><div><br></div><div>Available artifacts include:</div><div><br></div><div>* A JSON and gzipped JSON file mapping source files to Bugzilla components. e.g. <a href="https://index.taskcluster.net/v1/task/gecko.v2.autoland.pushlog-id.53952.source.source-bugzilla-info/artifacts/public/components.json" target="_blank">https://index.taskcluster.net/<wbr>v1/task/gecko.v2.autoland.push<wbr>log-id.53952.source.source-<wbr>bugzilla-info/artifacts/<wbr>public/components.json</a></div><div>* A JSON and gzipped JSON file listing source files without Bugzilla components. e.g. <a href="https://public-artifacts.taskcluster.net/c2fvXmqEQLy12DsWpXyKyg/0/public/missing.json" target="_blank">https://public-artifacts.taskc<wbr>luster.net/c2fvXmqEQLy12DsWpXy<wbr>Kyg/0/public/missing.json</a></div><div><br></div><div>The task basically runs various `mach file-info` sub-commands with --format=json (a new feature). This is all powered by moz.build Files() metadata, which jmaher and others have been curating for the past several months.<br></div><div><br></div><div>The JSON files can be a bit large. So I'm not sure if it makes sense to actively query them for lookups. But it would certainly be possible to import the JSON files into other services, local SQLite databases, to facilitate querying.</div><div><br></div><div>Given how difficult it is to run the moz.build evaluation feature on <a href="http://hg.mozilla.org" target="_blank">hg.mozilla.org</a> (<a href="https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/mozbuildinfo.html" target="_blank">https://mozilla-version-contr<wbr>ol-tools.readthedocs.io/en/<wbr>latest/hgmo/mozbuildinfo.html</a>)<wbr>, I'm really tempted to deprecate that service or have it powered by these new JSON files. If you are using this service or need to obtain metadata from source files, let me know so I can figure out a path forward.<br></div></div>
</blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Quick update...</div><div class="gmail_extra"><br></div><div class="gmail_extra">The CI task now fails if a file under source control does not have a bug component defined in moz.build metadata. This could potentially bite people adding new files to the repo or moving files around. But this is a good thing: we want every file in the repo to be associated with a bug component so we know where to file bugs. Add missing metadata is simple: just search for BUG_COMPONENT in moz.build files for examples.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, we now produce a smaller "components-normalized.json" file in addition to the original "components.json" file. e.g. <a href="https://public-artifacts.taskcluster.net/JDLSmj2XQwmfgRpHUUKFTg/0/public/components-normalized.json">https://public-artifacts.taskcluster.net/JDLSmj2XQwmfgRpHUUKFTg/0/public/components-normalized.json</a>. This /might/ be fast/small enough to load on demand.<br></div></div></div>