You felt it. The shift . That your role has fundamentally changed thanks to LLMs. It first entered your subconscious when you realized how easily you can now crank out PRs. You felt it more concretely (and less enthusiastically), as a reviewer when you opened your laptop one morning and noticed your review queue was double what it normally is thanks to everyone else cranking out PRs. And you feel…
With Mozilla’s migration from hg.mozilla.org to Github drawing near, the clock is ticking for developers still using Mercurial to find their new workflow. I previously blogged about how Jujutsu can help here , so please check that post out first if you aren’t sure what Jujutsu is, or whether it’s right for you. If you know you want to give it a shot, read on for a tutorial on how…
One of the pleasures of working at Mozilla, has been learning and using the Mercurial version control system. Over the past decade, I’ve spent countless hours tinkering my worfklow to be just so . Reading docs and articles, meticulously tweaking settings and even writing an extension . I used to be very passionate about Mercurial. But as time went on, the culture at Mozilla started changing.…
Taskcluster Github is the Taskcluster service responsible for kick starting tasks on Github repositories. At a high level: You install a Taskcluster app from the Github marketplace . This app sends webhooks to the Github service. Upon receiving a webhook, the Github service processes your repository’s .taskcluster.yml file. The Github service schedules tasks (if any) and updates the Github…
Last time we looked at some ways reviewers can keep the review process moving efficiently. This week, let’s put on our author hats and do the same thing.
In the next two posts we will examine the etiquette of using Phabricator. This post will examine tips from the reviewer’s perspective, and next week will focus on the author’s point of view. While the social aspects of etiquette are incredibly important, we should all be polite and considerate, these posts will focus more on the mechanics of using Phabricator. In other words, how to…
If it ain’t broke don’t fix it. This old addage is valuable advice that has been passed down through generations. But it hasn’t stopped these people from rewriting command line tools perfected 30+ years ago in Rust. This week we’ll take a quick look at exa , a replacement for ls . So why should you ignore the wise advice from the addage and replace ls ? Because there are…
Following up last week’s post on some mach try fundamentals, I figured it would be worth posting some actual concrete tips and tricks. So without further ado, here are some things you can do with ./mach try you may not have known about in rapid fire format.
There is a lot of confusion around mach try . People frequently ask “How do I get task X in mach try fuzzy?” or “How can I avoid getting backed out?”. This post is not so much a tip, rather an explanation around how mach try works and its relationship to the CI system (taskgraph). Armed with this knowledge, I hope you’ll be able to use mach try a little more…
Mozilla developers often need to juggle multiple build configurations in their day to day work. Strategies to manage this sometimes include complex shell scripting built into their mozconfig, or a topsrcdir littered with mozconfig-* files and then calls to the build system like MOZCONFIG=mozconfig-debug ./mach build . But there’s another method (which is basically just a variant on the…
Have you ever submitted a patch to Phabricator only to have reviewbot reveal dozens of lint errors all over? Or worse yet, have you landed before reviewbot had a chance to analyze your patch and been backed out over lint failures? If so fear not, we’ve all been there. Still, it’s hard not to feel a little embarrassed when it happens. Luckily for you, it’s pretty easy to eliminate…
I first joined Mozilla as an intern in 2010 for the “Tools and Automation Team” (colloquially called the “A-Team”). I always had a bit of difficulty describing our role. We work on tests. But not the tests themselves, the the thing that runs the tests. Also we make sure the tests run when code lands. Also we have this dashboard to view results, oh and also we do a bunch of…
If you’re working with mozilla-central on Windows and followed the official documentation , there’s a good chance the MozillaBuild shell is running in the default cmd.exe console. If you’ve spent any amount of time in this console you’ve also likely noticed it leaves a bit to be desired. Standard terminal features such as tabs, splits and themes are missing. More…
This post was co-authored with Marco Castelluccio , and was originally posted to the Mozilla Hacks Blog . A browser is an incredibly complex piece of software. With such enormous complexity, the only way to maintain a rapid pace of development is through an extensive CI system that can give developers confidence that their changes won’t introduce bugs. Given the scale of our CI, we’re always…
Mozilla recently announced that we are planning to de-commission irc.mozilla.org in favour of a yet to be determined solution. As a long time user and supporter of IRC, this decision causes me some melancholy, but I 100% believe that it is the right call. Moreover, having had an inside glimpse at the process to replace it, I’m supremely confident whatever is chosen will be the best option…
Mozilla uses a lot of Python. Most of our build system, CI configuration, test harnesses, command line tooling and countless other scripts, tools or Github projects are all handled by Python. In mozilla-central there are over 3500 Python files (excluding third party files), comprising roughly 230k lines of code. Additionally there are 462 repositories labelled with Python in the Mozilla org on…
Have you ever needed to inspect the taskgraph locally? Did you have a bad time? Learn how to inspect the taskgraph like a PRO. For the impatient skip to the installation instructions below.
It’s no secret that I’m not a fan of try syntax, it’s a topic I’ve blogged about on several occasions 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…
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…
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 feedback. You could request a loaner from releng. But this is…
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…
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…
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. Introducing bookbinder When working with bookmarks (or anonymous heads) I often wanted to operate on the entire series of commits within the feature I was working…
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…
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. With mozreview entering beta , I decided to throw out my old mq based workflow and try to use all the latest and greatest tools. That…
tl;dr Look for reports like this in the near future! At Mozilla, platform developers are culturally bound to tbpl . We spend a lot of time staring at those bright little letters, and their colour can mean the difference between hours, days or even weeks of work. With so many people performing over 420 pushes per day , all watching, praying, rejoicing and cursing, it’s paramount that the…
That’s not a rhetorical question. I’d like to know in which scenarios a mixin in python really is the best option. I can’t seem to think of any, but maybe I’m not thinking outside the box enough. The basic idea of a mixin is to create a small re-usable class that can “plug-in” to other larger classes. From the wikipedia definition , a mixin is a way to compose…
My last post was basically a very long winded way of saying, “we have a problem”. It kind of did a little dance around “why is there a problem” and “how do we fix it”, but I want to explore these two questions in a bit more detail. Specifically, I want to return to the two case studies and explore why our test harnesses don’t work and why mozharness does…
Dry versus Wet As programmers, we are taught early on that code duplication is bad and should be avoided at all cost. It makes code less maintainable, reusable and readable. The DRY principle is very basic and fundamental to how most of us approach software design. If you aren’t familiar with the DRY principle, please take a minute to read the wikipedia page on it. The counterpart of DRY, is…
Getting Started tl;dr - It is possible to add more mach to your B2G repo! To get started, install pip: $ wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O - | python Install b2g-commands: $ pip install b2g-commands To play around with it, cd to your B2G repo and run: $ git pull # make sure repo is up to date $ ./mach help # see all available commands $ ./mach help <command> # see…
Mach is an amazing tool which facilitates a large number of common user stories in the mozilla source tree. You can perform initial setup, execute a build, run tests, examine diagnostics, even search Google. Many of these things require an object directory. This can potentially lead to some confusion if you typically have more than one object directory at any given time. How does mach know which…
This probably isn’t a groundbreaking revelation to most Mozillians, but it’s something I haven’t quite managed to put into words until now. On the Tools and Automation team at Mozilla, the easiest way to describe what we do is to say “We try to make the lives of others within the community easier”. This is a vague statement, but it’s about as close as we can get…
Before now running ‘classic’ unittests (mochitest, reftest, xpcshell, etc.) on B2G emulators has been a massive pain. The new recommended way of running them is through mach. Update B2G repo if you haven’t already: git pull Configure an emulator: BRANCH=master ./config.sh emulator Build: ./build.sh Run: ./mach mochitest-remote
OUTDATED The steps in this article are no longer accurate. Pushing a custom command line is easier now. See here for more details. Have you ever wanted to see the test results of a custom command line in try? Things like –test-manifest, –shuffle or –run-slower? Now you can! The process isn’t exactly optimized for the developer use case, but neither is it really difficult to…
qqver is a Mercurial extension that forces mq to version all patch queues in the same repository. The syntax is the exact same as when doing normal patch queue versioning (i.e ‘hg init –mq’), except the repo is created one directory higher so it is able to track all patch queues. As with stock queue repos, new and existing patches are added automatically.
I came across an odd python problem the other day. I wanted to format a log message without printing it with python’s logging module. But I couldn’t find any examples or others who wanted to do the same thing. You might ask why I would want to do this. In my case, I was using sys.stdout.write() to display the progress of a download as a percentage. Python’s logging module…
Hey! Check it out, I have crash stacks in my logs now! I know, I know, I took my sweet time. I’m sorry. I hope this doesn’t damage our relationship. Is there anything I can do to make it up to you? I want to help. I really do. It’s just. I don’t know. I guess I’ve been feeling under the weather lately. I must have caught a bug .
Throughout most of our B2G test automation deployment, we’ve been very conscious about not enabling too many tests simply because we didn’t have enough capacity on our test slaves to run them all. Regardless it was still bad enough as it was (many of you probably experienced very long wait times for results). Thanks to releng (and especially Rail Aliiev) we are now running most of our…
As B2G continues to trod onwards to its release, there is still a lot of confusion about the level and state of test coverage it has. Back in November we started running mochitests, reftests and marionette/webapi tests on ARM emulators. Now we’ve also added xpcshell tests and for the most part we have these nice green letters to look at on TBPL that make us feel good about ourselves. But…
Contrary to popular belief, we (the A-Team) have been running mochitests, reftests, marionette tests and webapi tests on B2G in some form of continuous integration or another for about 5 months now. They’ve been reporting results to a TBPL look-alike called autolog , and were run on Amazon EC2 VM’s with emulators. This was a temporary solution to get something stood up quickly while we…
This quarter I’ve been focusing on getting reftests running on B2G, triaging them and fixing various issues. The purpose of this post is to outline their status, go over the work that still needs to be done and point out where I will need some help.
Sometimes I’d remember this awesome thing that I saw on Reddit awhile back and want to share it with someone. I’d try to find it through browser history or reddit search, but I wasn’t usually successful. Reddit search isn’t very good and I use Reddit a lot so my browser history for reddit.com is huge and unwieldy. So in my spare time I decided to write Reddit History . It…
Normally I don’t bother making top ten lists at the end of the year, but I was bored and figured, why not? So without further ado, here are my top ten albums of 2011. Unexpect - Fables of the Sleepless Empire The Decemberists - The King is Dead Battles - Gloss Drop St. Vincent - Strange Mercy The Dear Hunter - The Color Spectrum Fucked Up - David Comes to Life Cut Copy - Zonoscope Panda Bear…
Mozconfigwrapper is a tool inspired by Doug Hellman’s magnificent virtualenvwrapper . In a nutshell, mozconfigwrapper hides all of your mozconfigs into a configurable directory (defaults to ~/.mozconfigs), and lets you easily switch, create, remove, edit and list them. Mozconfigwrapper is Unix only for now.
So here in Toronto another cyclist was killed today. I’m a little bit frustrated with the state of cycling in Toronto in general. On one hand you have people like Mr. Ford who think that cyclists are always to blame and should be run off the road, and on the other you have cyclists who actually do run reds and wear black in the middle of the night giving the rest of us a bad name. I decided…