It’s no secret that I’m not a fan of try syntax, it’s a topic I’ve blogged about on severaloccasions before. Today, I’m pleased to announce that there’s a real alternative now landed on
mozilla-central. It works on all platforms with mercurial and git. For those who just like to dive in:
$ mach mercurial-setup --update # only if using hg
$ mach try fuzzy
This will prompt you to install fzf. After bootstrapping is finished, you’ll enter an interface
populated with a list of all possible taskcluster tasks. Start typing and the list will be filtered
down using a fuzzy matching algorithm. I won’t go into details on how to use this tool in this blog
post, for that see:
Imagine this scenario. You’ve pushed a large series of commits to your favourite review tool
(because you are a believer in the glory of microcommits). The reviewer however has found several
problems, and worse, they are spread across all of the commits in your series. How do you fix all
the issues with minimal fuss while preserving the commit order?
I’ve previously blogged about why I believe try syntax is an antiquated development process
that should be replaced with something more modern and flexible. What follows is a series of ideas
that I’m trying to convert into a concrete plan of action to bring this about. This is not an
Intent to Implement or anything like that, but my hope is that this outline is detailed enough
that it could be used as a solid starting point by someone with enough time and motivation to
work on it.
One of the most painful aspects of a developer’s work cycle is trying to fix failures that show up
on try, but which can’t be reproduced locally. When this happens, there were really only two
options (neither of them nice):
You could spam try with print debugging. But this isn’t very powerful, and takes forever to get
You could request a loaner from releng. But this is a heavy handed process, and once you have the
loaner it is very hard to get tests up and running.
I’m pleased to announce there is now a third option, which is easy, powerful and 100% self-serve.
Rather than trying to explain it in words, here is a ~5 minute demo:
Mach is the Mozilla developer’s swiss army knife. It gathers all the important commands you’ll ever
need to run, and puts them in one convenient place. Instead of hunting down documentation, or asking
for help on irc, often a simple |mach help| is all that’s needed to get you started. Mach is great.
But lately, mach is becoming more like the Mozilla developer’s toolbox. It still has everything you
need but it weighs a ton, and it takes a good deal of rummaging around to find anything.
Frankly, a good deal of the mach commands that exist now are either poorly written, confusing to use,
or even have no business being mach commands in the first place. Why is this important? What’s wrong
with having a toolbox?
Today marks the 5 year anniversary of try syntax. For the uninitiated, try syntax is a string that
you put into your commit message which a parser then uses to determine the set of builds and
tests to run on your try push. A common try syntax might look like this:
try: -b o -p linux -u mochitest -t none
Since inception, it has been a core part of the Mozilla development workflow.
For many years it has served us well, and even today it serves us passably. But it is almost time
for try syntax to don the wooden overcoat, and this post will explain why.
I mentioned in my previous post a mercurial extension I wrote for making bookmarks easier to
manipulate. Since then it has undergone a large overhaul, and I believe it is now stable and
intuitive enough to advertise a bit more widely.
When working with bookmarks (or anonymous heads) I often wanted to operate on the
entire series of commits within the feature I was working on. I often found myself digging out
revision numbers to find the first commit in a bookmark to do things like rebasing, grafting or
diffing. This was annoying. I wanted bookmarks to work more like a git-style branch, that has a
definite start as well as an end. And I wanted to be able to easily refer to the set of commits
contained within. Enter bookbinder.
This is a continuation of my previous post called The New Mercurial Workflow. It assumes that
you have at least read and experimented with it a bit. If you haven’t, stop right now, read it, get
set up and try playing around with bookmarks and mozreview a bit.
You may not know that most of our test harnesses are now outputting structured logs (thanks in large
part to :chmanchester’s tireless work). Saying a log is structured simply means that it is in a
machine readable format, in our case each log line is a JSON object. When streamed to a terminal or
treeherder log, these JSON objects are first formatted into something that is human readable, aka
the same log format you’re already familiar with (which is why you may not have noticed this).
There’s a good chance you’ve heard something about a new review tool coming to Mozilla and how it will change
everything. There’s an even better chance you’ve stumbled across one of gps’ blog posts on how
we use mercurial at Mozilla.