TL;DR: We are leveraging the try infrastructure to perform source code
analysis (linters, static analyzers, etc). You can take advantage of this
to trigger other try jobs on Phabricator revisions.

For more than a year, the Release Management & Quality team has been
running the Code review bot
<https://phabricator.services.mozilla.com/p/reviewbot/> using several
Mozilla in-house projects: Taskcluster <http://docs.taskcluster.net/> &
release-services <https://github.com/mozilla/release-services>.

Our process was simple at first: for every new patch on Mozreview, then
Phabricator, we would run a few analyzers in a Taskcluster task. It worked
well for some time, but did not provide the flexibility nor the performance
needed to support more analyzers (clang-format, Infer, Coverity, …)

So we decided to experiment with a more scalable architecture, using
Treeherder/Try to run all necessary analyzers for your patches, in parallel.

This move will give us a lot of benefits:

   -

   The analyzers themselves are well defined and exposed in
   mozilla-central, allowing us to use the exact same tools as our usual CI
   and the developers on their computers.
   -

   Better overall performance and stability (from mercurial clones to
   running analyzers safely in parallel)
   -

   A standard analyzer output in JSON will allow us to easily add new
   analyzers. These new implementations could even come from you!


Over the last few months, we have been building the different pieces needed
to move the bot on the Try infrastructure, and today, I’m glad to announce
it’s running in production, on your revisions!

Any new Diff on Phabricator should now have a build plan named Source Code
Analysis <https://phabricator.services.mozilla.com/harbormaster/plan/4/>.
Phabricator triggers a code review as soon as the diff is published,
automatically creating a new try job. You’ll get a “Treeherder Jobs” link
next to the build plan when it’s created by the bot, allowing you to check
on the analysis progress, and dive into the issues.


You will also be able to use Treeherder to add new jobs, effectively making
it possible to run try tests for Phabricator revisions in just a few
clicks. On a Treeherder push, open its action menu on the right side (right
after the Pin button). The "Add new jobs" options shows all the available
jobs grouped by platform and test suite, and you can click to select and
then submit. "Add new jobs (Search)" allows you to search in the job names
like mach try fuzzy and add them.

If the patch contains any issues, they will be reported as before, through
inline comments. You can now restart a build if it fails (click on the
Build, there is a “Restart Build” link in the right sidebar). Please note
that secure revisions are not supported for now, but we are actively
working on that (a build failure will be shown for secure revisions for the
time being).

We would like to thank the different people and teams involved in this
effort: Andrew from the Automation team; Tom, Rail, Chris and Rok from
Release Engineering; Dustin and Peter from the Taskcluster team; Steven,
glob and David from the Engineering Workflow team.

If you have any questions regarding this move or the code review bot, feel
free to contact us by mail or on IRC #static-analyzers.

Bastien, on the behalf of the Release Management and Quality team.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to