It’s a fairly common practice to build and test every time someone makes a change in the code. In the industry, we call this process “Continuous Integration” (CI). Another good practice is to automate the deployment of your builds to end-users. This process is called “Continuous Deployment” (CD). There are several CI/CD products on the market. Mozilla has used some of them for years and still uses them in some projects. About 6 years ago, Mozilla needed a CI/CD product that did more than what was available and started Taskcluster. If you’re interested in knowing more about why we made Taskcluster, please let me know in the comments and I’ll write a dedicated post.
Since then, we’ve entirely migrated many Android projects like Firefox, Firefox Focus, Firefox for Amazon’s Fire TV, Android-Components, and the upcoming Firefox Preview to Taskcluster. The rationale for migrating off another CI/CD was usually the following: we want to ensure what we’re shipping to end-users comes from Mozilla, while still providing the development team an easy and consistent way to configure their tasks.
Taskcluster and task definitions
A task is an arbitrary piece of code that is executed by Taskcluster. We tell Taskcluster to execute a task by submitting some configuration, that we call the “task definition”. A task definition contains data about version control repository it deals with or what commands to run. As your project grows, it will likely need more than a single task to perform all actions. In this case, you need a graph of task definitions. You can submit a graph in different ways:
either by manually entering each task on the task creator,
by defining them all in a .taskcluster.yml file in your repository
by defining a single task in .taskcluster.yml and letting this task generate the rest of the graph. We call this single task a “decision task”. It can be implemented:
either by using one of the Taskcluster libraries (the Python one for instance),
or by using a higher-level framework: taskgraph.
The above graph submission options are ordered by complexity. You may not want to start with option 3 immediately. Although, if your CI/CD pipeline deals with multiple platforms, multiple types of tests, and/or multiple types of pipelines, you may want solution 3b. More on this below.
Solution 3a: What’s inside the decision task
Solution 3b: Inside the decision task
Taskgraph was originally built for the most complex project, Firefox itself, and it was strongly tied to it. So, when a simpler project - Firefox Focus - came up a year and a half ago, we - the Development Team and Release Engineering - agreed on going with solution 2 and later on then 3a. Firefox Focus went great and became the base of a lot of Android projects. They have grown quite big since Firefox Focus started. The way CI/CD is configured there has grown on top of a code which wasn’t meant to be that big, and which was duplicated across projects.
Taskcluster and people
Moreover, people started to come from our main repository (where Firefox for Android is) to our other Android projects. With each project, they had to figure out how things work and Release Engineering has had to be involved in many changes, so we were losing the “provide the development team an easy way to configure their tasks” feature.
Here enters taskgraph
We know Android projects are becoming more and more complex, in terms of CI/CD. We know taskgraph is able to support thousands of jobs by splitting the complexity in small and dedicated files. We know Firefox developers have more or less knowledge about taskgraph to be able to add/modify their job without compromising the rest of the graph. So we decided to make taskgraph a more generic framework so Android projects can reuse it.
Taskgraph, the tour
In a few words
Like its name infers, taskgraph generates graphs of tasks for all types of events. Events can be “someone just pushed a new commit on the repository” or “someone just triggered a release”. Taskgraph knows what type of event happened and submits the corresponding graph to Taskcluster.
It’s fast! Tens of thousands of tasks are generated in under a minute
It deals with default values. Oftentimes you have to provide the same data for each task, taskgraph knows about the right defaults, so you can focus on what’s really important to your task
It validates data before submitting anything to Taskcluster.
It’s deterministic. You’ll get the exact same result by reusing a set of parameters from a run on another machine.
It’s both configuration-oriented and programming-oriented. Want to avoid repeating the same configuration lines over and over? You can write a python function in a separate file
On Android projects, when we first implemented our simple solution based off of taskcluster libraries, we did have feature #1 (easy, when you deal with a handful of tasks), but we started to wait minutes to get a hundred tasks submitted. At some point, we needed feature #2, so we had to implement our own default values. We’ve never had feature #3 and #4. Depending on the Android project, feature #5 was more or less implemented.
Other features I like
Docker images! We can create our build environments directly on Taskcluster as docker images and have our build tasks using them. We don’t need to publish the images somewhere, like on Docker hub.
Cached tasks. Sometimes you just want to rebuild something when a subset of the code changes (for instance a Dockerfile). Taskgraph knows where to find these tasks and reuse them in the graph it submits
Graphs that depend on other graphs. Cached tasks are for single tasks, but you can reuse entire graphs. This is useful in Firefox. We generate all the shippable builds whenever a push to the repository happens. Then, if we think they’re good enough, we promote them to be actually shipped.
To me, re-using taskgraph instead of reimplementing a new framework is today a huge win just for the sake of these features, even for small projects. We didn’t do it a year and a half ago, because taskgraph wasn’t a self-served module. Tom Prince put a lot of effort to make taskgraph generic enough to serve other projects than Firefox.
Introduction to taskgraph
Data flow, part 1
Hacking taskgraph is usually dealing with that part of the data flow
In order to help taskgraph to tell if a task should end up in a graph, tasks are grouped in “kinds”. Kinds group tasks that are similar.
For instance: You’d like to have 2 compilation tasks, one for a debug build and the other for an optimized one. Chances are both builds are generated with the same command, modulo a flag. In taskgraph, you will define both tasks under the same kind.
Each kind is stored in its own kind.yml file. It’s the configuration-oriented part of taskgraph. You usually put raw data in them. There are some bits of simple logic that you can put in them.
For example: job-defaults provides some default values for all jobs defined in the kind, it can be useful if the build tasks are generated with the same command.
The loader is in charge of taking every task in the kind, applying job-defaults and finding what are the right upstream dependencies. The dependency links are what make the graphs of tasks.
For instance: In addition to having common values, both of your build tasks may depend on Docker images, where your full build environment is stored. The loader will output the 2 build tasks and set the docker image as their dependencies,
Here comes the programming oriented part of taskgraph. The configuration defined in kind.yml is usually defined to be as simple as possible. Transforms take them and translate them into actual task definitions. Transforms can be shared among kinds, which gives a way to factorize common logic. Some transforms validate their input, ensuring the dataflow is sane.
For example: For the sake of cost, Taskcluster enforces tasks to be deleted after a certain amount of time. The last transform ensures this value is valid and if it’s not defined (which usually happens) sets it to a year from now.
Data flow, part 2
You may not need it, but that’s how optimization happens!
Taskgraph always generates the full graph, then it filters out what’s not needed. That’s what the target task phase does.
For instance: If you want to ship a nightly build, target_tasks will only select the right tasks to build, sign, and publish this build.
Some tasks may have been already scheduled. If so, taskgraph takes them out of the target tasks.
For example: If the nightly build task was made at the same time as the debug one, taskgraph can reuse the task and just submit the signing and publishing tasks.
At this point, taskgraph knows exactly what subgraph to submit. It delegates the submission to taskcluster via one of its client libraries. Tasks are then generated.
I really enjoyed “taskgraph-ifying” the most important mobile projects. We have leveraged a codebase that can scale while being able to handle edge cases. We’ve been able to factorize some of the common logic, which wasn’t possible with our initial solution. There’s still some improvement we can, and Mitch, Tom and I are working on improving the quality of life.
Moreover, having taskgraph enables a better release workflow for Firefox Preview: we may have finer grained permission on who can ship a release. It requires more work and more blog posts, but taskgraph is a necessary stepping stone.
Back in July and August, I was looking into a performance issue in Treeherder . Treeherder is a Django app running on Heroku with a MySql database via RDS. This post will cover some knowledge gained while investigating the performance issue and the solutions for it.
NOTE: Some details have been skipped to help the readability of this post. It’s a long read as it is!
Treeherder is a public site mainly used by Mozilla staff. It’s used to determine if engineers have introduced code regressions on Firefox and other products. The performance issue that I investigated would make the site unusable for a long period of time (a few minutes to 20 minutes) multiple times per week. An outage like this would require blocking engineers from pushing new code since it would be practially impossible to determine the health of the code tree during an outage. In other words, the outages would keep “the trees” closed for business. You can see the tracking bug for this work here.
The smoking gun
On June 18th during Mozilla’s All Hands conference, I received a performance alert and decided to investigate it. I decided to use New Relic which was my first time using it and it also was my first time investigating a performance issue of a complex web site. New Relic made it easy and intiutive to get to what I wanted to see.
The UI slow downs came from API slow downs (and timeouts) due to database slow downs. The API that was most affected was JobsViewSet API which is heavily used by the front-end developers. The spike shown on the graph above was rather anomoulous. After some investigation I found that a developer unintentionally pushed code with a command that would trigger an absurd number of performance jobs. A developer normally would request one performance job per code push rather than ten. As these jobs finished (very close together in time) their performance data would be inserted into the database and make the DB crawl.
Since I was new to the team and the code-base, I tried to get input from the rest of my coworkers. We discussed using Django’s bulk_create to reduce the impact on the DB. I was not completely satisfied with the solution because we did not yet understand the root issue. From my Release Engineering years I remembered that you need to find the root issue or you’re just putting a band-aid on that will fall off sooner or later. Treeherder’s infrastructure had a limitation somewhere and a code change might only solve the problem temporarily. We would hit a different performance issue down the road. A fix at the root of the problem was required.
I knew I needed proper insight as to what was happening plus an understanding of how each part of the data ingestion pipeline worked together. In order to know these things I needed metrics, and New Relic helped me to create a custom dashboard.
Similar set-up to test fixes
I made sure that the Heroku and RDS set-up between production and stage were as similar as possible. This is important if you want to try changes on stage first, measure it, and compare it with production.
I had a very primitive knowledge of MySql at scale and I knew that I would have to lean on others to understand the potential solution. I want to thank dividehex, coop and ckolos for all their time spent listening and all the knowledge they shared with me.
The cap you didn’t know you have
After reading a lot of documentation about Amazon’s RDS set-up I determined that slow downs in the database were related to IOPS spikes. Amazon gives you 3 IOPS per Gb and with a storage of 1 Terabyte we had 3,000 IOPS as our baseline. The graph below shows that at times we would get above that max baseline.
To increase the IOPS baseline we could either increase the storage size or switch from General SSD to Provisioned IOPS storage. The cost of the different storage type was much higher so we decided to double our storage, thus, doubling our IOPS baseline. You can see in the graph below that we’re constantly above our previous baseline. This change helped Treeherder’s performance a lot.
In order to prevent getting into such a state in the future, I also created a CloudWatch alert. We would get alerted if the combined IOPS is greater than 5,700 IOPS for 6 datapoints within 10 minutes.
One of the problems with Treeherder’s UI is that it hits the backend quite heavily. The load depends on the number of users using the site, the number of pushes that are in view and the number of jobs that each push has determines the load on the backend.
Fortunately, Heroku allows auto scaling for web nodes. This required upgrading from the Standard 2x nodes to the Performance nodes. Configuring the auto scaling is very simple as you can see in the screenshot below. All you have to do is define the minimum and maximum number of nodes, plus the threshold after which you want new nodes to be spun up.
Troubleshooting this problem was quite a learning experience. I learned a lot about the project, the monitoring tools available, the RDS set up, Treeherder’s data pipeline, the value of collaboration and the importance of measuring.
I don’t want to end this post without mentioning that this was not excruciating because of the great New Relic set up. This is something that Ed Morley accomplished while at Mozilla and we should be very greatful that he did.
I can’t remember why but few months ago I started looking into keeping my various React projects secure. Here’s some of what I discovered (more to come). I hope some will be valuable to you.
A while ago I discovered Snyk and I hooked it up my various projects with it. Snyk sends me a weekly security summary with the breakdown of various security issues across all of my projects.
Snyk also gives me context about the particular security issues found:
It also analyzes my dependencies on a per-PR level:
Other features that I’ve tried from Snyk:
It sends you an email when there’s a vulnerable package (no need to wait for the weekly report)
Open PRs upgrading vulnerable packages when possible
Patch your code while there’s no published package with a fix
The above features I have tried and I decided not to use them for the following reasons (listed in the same order as above):
As a developer I already get enough interruptions in a week. I don’t need to be notified for every single security issue in my dependency tree. My projects don’t deal with anything sensitive, thus, I’m OK with waiting to deal with them at the beginning of the week
The PR opened by Snyk does not work well with Yarn since it does not update the yarn.lock file, thus, requirying me to fetch the PR, run yarn install and push it back (This wastes my time)
The feature to patch your code (Runtime protection or snyk protect) adds a very high set up cost (1–2 minutes) everytime you need to run yarn install. This is because it analyzes all your dependencies and patches your code in-situ. This gets on the way of my development workflow.
Overall I’m very satisfied with Snyk and I highly recommend using it.
In the following posts I’m thinking of speaking on:
How Renovate can help reduce the burden of keeping your projects up-to-date (reducing security work later on)
Differences between GitHub’s security tab (DependaBot) and Snyk
npm audit, yarn audit & snyk test
NOTE: This post is not sponsored by Snyk. I love what they do, I root for them and I hope they soon fix the issues I mention above.
The GPG key used to sign the Firefox release manifests is expiring soon, and so we're going to be switching over to new key shortly.
The new GPG subkey's fingerprint is 097B 3130 77AE 62A0 2F84 DA4D F1A6 668F BB7D 572E, and it expires 2021-05-29.
The public key can be fetched from
files from Firefox 68 beta releases, or from below. This can be used to validate
existing releases signed with the current key, or future releases signed with
the new key.
Back in 2014 I blogged about several ideas about
how to make Firefox updates smaller.
Since then, we have been able to implement some of these ideas, and we also
landed a few unexpected changes!
It's hard to measure exactly what the impact of all these changes are over
time. As Firefox continues to evolve, new code and dependencies are added,
old code removed, while at the same time the build system and
installer/updater continue to see improvements. Nevertheless I was
interested in comparing what the impact of all these changes would be.
To attempt a comparison, I've taken the latest release of Firefox as of
March 6, 2019, which is Firefox 65.0.2. Since most of our users are on
Windows, I've downloaded the win64 installer.
Next, I tried to reverse some of the changes made below. I re-compressed
omni.ja, used bz2 compression for the MAR files, re-added the deleted
images and startup cache, and used the old version of mbsdiff to generate
the partial updates.
Partial Update (from 64.0.2)
Small updates FTW!
Ideally most of our users are getting partial updates from version to
version, and a nearly 50% reduction in partial update size is quite
significant! Smaller updates mean users can update more quickly and
One of the largest contributors to our partial update sizes right now are
the binary diff size for compiled code. For example, the patch for xul.dll
alone is 13.8MB of the 14.9MB partial update right now. Diffing algorithms
like courgette could
help here, as could investigations into making our PGO
process more deterministic.
Here are some of the things we've done to reduce update sizes in Firefox.
This one is a bit counter-intuitive. omni.ja files are basically just zip
files, and originally were shipped as regular compressed zips. The zip
format compressed each file in the archive independently, in contrast to
something like .tar.bz2 where the entire archive is compressed at once.
Having the individual files in the archive compressed makes both types of
updates inefficient: complete updates are larger because compressing (in the MAR file)
already compressed data (in the ZIP file) doesn't yield good results, and partial updates are
larger because calculating a binary diff between two compressed blobs also
doesn't yield good results. Also, our Windows installers have been using
LZMA compression for a long time, and after switching to LZMA for update
compression, we can achieve much greater compression ratios with LZMA of
the raw data versus LZMA of zip (deflate) compressed data.
The expected impact of this change was ~10% smaller complete updates, ~40%
smaller partial updates, and ~15% smaller installers for Windows 64 en-US
Pretty straightforward idea: LZMA does a better job of compression than
bz2. We also looked at brotli and zstd for compression, but LZMA performs
the best so far for updates, and we're willing to spend quite a bit of CPU
time to compress updates for the benefit of faster downloads.
LZMA compressed updates were first shipped for Firefox 56.
The expected impact of this change was 20% reduction for Windows 64 en-US
This came out of some investigation about why partial updates were so
large. I remember digging into this in the Toronto office with Jeff
Muizelaar, and we noticed that one of the largest contributors to partial
update sizes were the startup cache files. The buildid was encoded into the
header of startup cache files, which effectively changes the entire
compressed file. It was unclear whether shipping these provided any
benefit, and so we experimented with turning them off. Telemetry didn't
show any impact to startup times, and so we stopped shipping the startup
cache as of Firefox 55.
The expected impact of this change was about 25% for a Windows 64 en-US partial update.
Adam Gashlin was working on a new binary diffing tool called bsopt, meant
to generate patch files compatible with bspatch. As part of this work, he
discovered that a few changes to the current mbsdiff implementation could
substantially reduce partial update sizes. This first landed in Firefox 61.
The expected impact of this change was around 4.5% for partial updates for
Window 64 builds.
We removed a few hundred kilobytes of duplicate files from Firefox 52, and put
in place a check to prevent further duplicates from being shipped. It's hard to
measure the long term impact of this, but I'd like to think that we've kept
bloat to a minimum!
I've very happy to have had the opportunity to attend and speak at PyCon
Canada here in Toronto last week.
PyCon has always been a very well organized conference. There are a wide
range of talks available, even on topics not directly related to Python.
I've attended previous PyCon events in the past, but never the Canadian
My talk was titled How Mozilla uses Python to Build and Ship
slides are available here if you're interested. I
believe the sessions were recorded, but they're not yet available online. I
was happy with the attendance at the session, and the questions during and
after the talk.
As part of the talk, I mentioned how Release Engineering is
a very distributed team. Afterwards, many people had followup questions
about how to work effectively with remote teams, which gave me a great
opportunity to recommend John O'Duinn's new book, Distributed
PEP 572: The Walrus
My favourite quote from the talk: "Dictators are people too!"
If you haven't followed Python governance, Guido stepped down as BDFL
(Benevolent Dictator for Life) after the PEP was resolved. Dustin focused
much of his talk about how we in the Python community, and more generally
in tech, need to treat each other better.
Froilán Irzarry's Keynote talk on the second day was really impressive.
You Don't Need That!
Design patterns in Python
My main takeaway from this was that you shouldn't try and write Python
code as if it were Java or C++ :) Python has plenty of language features
built-in that make many classic design patterns unnecessary or trivial to
Numpy to PyTorch
Really neat to learn about PyTorch, and leveraging the GPU to accelerate
Gathering Related Functionality: Patterns for Clean API
I really liked his approach for creating clean APIs for things like class
constructors. He introduced a module called
variants which lets you
write variants of a function / class initializer to support varying types
of parameters. For example, a common pattern is to have a function that
takes either a string path to a file, or a file object. Instead of having
one function that supports both types of arguments, variants allows you
to make distinct functions for each type, but in a way that makes it
easy to share underlying functionality and also not clutter your
Last week, without a lot of fanfare, we shut off the last of the
infrastructure here at Mozilla.
Our primary release branches have been switched over to taskcluster for
some time now. We needed to keep buildbot running to support the old
ESR52 branch. With the release of Firefox 60.2.0esr earlier this month,
ESR52 is now officially end-of-life, and therefore so is buildbot here at
Looking back in time, the first commits to our
repository was over 10 years ago on April 27, 2008 by Ben Hearsum: "Basic Mozilla2
Buildbot usage at Mozilla actually predates that by at least two years,
Ben was working on some
patches in 2006.
Earlier in my career here at Mozilla, I was doing a lot of work with
Buildbot, and blogged quite a bit about our
experiences with it.
Buildbot served us well, especially in the early days. There really were no
other CI systems at the time that could operate at Mozilla's scale.
Unfortunately, as we kept increasing the scale of our CI and release
infrastructure, even buildbot started showing some problems. The main
architectural limitations of buildbot we encountered were:
Long lived TCP sessions had to stay connected to specific server
processes. If the network blipped, or you needed to restart a server,
then any jobs running on workers were interrupted.
Its monolithic design meant that small components of the project were hard
to develop independently from each other.
The database schema used to implement the job queue became a bottleneck
once we started doing hundreds of thousands of jobs a day.
On top of that, our configuration for all the various branches and
platforms had grown over the years to a complex set of inheritance rules,
defaults, and overrides. Only a few brave souls outside of RelEng managed
to effectively make changes to these configs.
Today, much much more of the CI and release configuration lives in
tree. This has many
Changes are local to the branches they land on. They ride the trains
naturally. No need for ugly
Developers can self-service most of their own requests. Adding new types
of tests, or even changing the
compiler are possible without any
involvement from RelEng!
On Monday I attended one of the pre-conference workshops by Dan Mall’s “Design workflow for a multi-device world”. Dan guided us through the process of defining a problem, brainstorming objectives and key results (aka OKRs) and made us work together to build some of what we decided to tackle. We divided the whole classroom into five or six teams with 5 to 7 members each. Each team had various skillsets (e.g. designers and coders).
In my team, the “bike shed” team, we decided to rewrite TTC’s trip planning feature. We did not manage to finish the product, however, we managed to build one of the three objectives and partially complete another. The team had two people who did compositions, two people who could code and one person helping us collaborate and coordinate.
This exercise included few new things to me. For instance, I worked within a team context to create a product rather than building a feature by myself.
It was also a new experience for me to work closely with a designer. We chose to build a multi-option toggle feature to mix transit methods. The process started with writing on paper what he had in mind. I tried building a prototype from scratch to see if I understood what he wanted. I did not get it quite right the first time so wedecided to search in codepen to find similar. Once we found something we liked I started iterating on the code while he started preparing the icons for me to use. By the end of it we had something that worked but did not have enough time to complete. This is the codepen I forked and this is the unfinished feature where I left it at.
This exercise was a very humbling experience as I felt the pressure to produce something for a designer (Scott from Motorola services) that was right there beside me and I was “the coding expert”. I quote coding expert as I barely have a year of frontend experience. I started from a forked pen that had roughly what Scott wanted, however, I knew I was going to face a very difficult time not before long. The codepen had been written using few non-standard languages (pugjs and SCSS) instead of writing standard HTML & CSS. Another difficulty I knew I was going to face was that I did not have experience turning an image into a toggle button. The forked pen only had text inside the buttons. I deferred solving it by only dealing with text labels at first, instead I addressed other issues before integrating the icons which would require some extra research.
It was also the first time working with another coder (Sheneille Patil) on a fast paced environment. We needed to quickly figure our own development culture. Creating a GitHub repository was not an option as she was not comfortable with it. We decided to turn to codepen.io and to build features that would not conflict with each other. The final plan was to collect our different pieces of code and merge them in a single pen. We did not have enough time to get to this.
I hope you found something interesting out of this post. It’s not my tipical programming related post. I’m very grateful to SmashingConf for having lined up such great speakers and very practical workshops and for Mozilla to support my learning.
For a long time Mozilla’s JS team and others have been using https://arewefastyet.com to track the JS engine performance against various benchmarks.
In the last little while, there’s been work moving those benchmarks to another continuous integration system and we have the metrics in Mozilla’s Perfherder. This rewrite will focus on using the new generated data.
If you’re curious on the details about the UI refresh please visit this document. Feel free to add feedback. Stay tuned for an update next month.
Through this work I learned a lot about full stack development (frontend, backend and deployments for both). I could write a blog post per item, however, listing it all in here is better than never getting to write a post for any of them.
Note, I’m pointing to commits that I believe have enough information to understand what I learned.
Back in January I had to make a critical decision. I had to determine if to separate the Firefox health dashboard (formely known as Platform health) into a backend and frontend projects or to keep it together.
The intent was to make it easier to maintain the project by reducing the complexity of having code that is presentational versus processing code. I also wanted to remove the boilerplate needed for webpack and babel. It was also beneficial to have the liberty of changing packages without worrying of regressing the frontend or the backend. The only disadvantages was to have to do the work and that we might need in the future coordinated changes (or versioned APIs). We did not see the disadvantage of code being duplicated since there wasn’t any (or much — I can’t recall now) shared between the two apps.
This all came from hitting a very odd production specific issue. I thought this was all caused from the complex webpack configuration the project had. Because we were not making progress determining the root issue I decided to switch to Neutrino. Switching to Neutrino made everything easier, however, it was unclear how to make it work with the original project’s design. The original design had the frontend files being served as static assets of the Koa app. Switching to Neutrino took away webpack headaches since it makes good default configuration options for the project.
Keeping both frontend and backend apps within the same repository complicated the deployment story since there were some Heroku restrictions. I tried using subtrees, however, it still required manual intervention (see explanation). I didn’t know at the time that we could have deployed the backend to Heroku while deploying the frontend to Netlify. This would have allowed to keep both project within the same repository. Alas! We now have two repositories.
If you want to look at the code changes you can see them here.
At the beginning of the month I came back from my last few weeks of parental leave (thanks Mozilla!). While I was away Sarah Clements took over some Firefox Quantum release criteria work and I’m pleased to see that she managed to tackle everything well by herself.
Some of the major changes she made was to separate the Quantum criteria page into 32-bit and 64-bit. This simplifies the graphs and allows release stakeholders to see more clearly how one specific architecture is doing.
She also added the new release criteria for Firefox’s GeckoView efforts.
about how we were able to ship new releases for Nightly, Beta, Release and ESR versions of Firefox for Desktop and Android in less than a day in response to the
People commented on how much faster the Beta and Release releases were
compared to the ESR release, so I wanted to dive into the releases on the
different branches to understand if this really was the case, and if so,
We can see that Firefox 59 and 60.0b4 were significantly faster to run than ESR
52 was! What's behind this speedup?
Release Engineering have been busy migrating release automation from
buildbot to taskcluster . Much of ESR52 still runs on buildbot, while
Firefox 59 is mostly done in Taskcluster, and Firefox 60 is entirely done
In ESR52 the initial builds are still done in buildbot, which has been
missing out on many performance gains from the build system and AWS side.
Update testing is done via buildbot on slower mac minis or windows hardware.
The Firefox 59 release had much faster builds, and update verification is
done in Taskcluster on fast linux machines instead of the old mac minis or
The Firefox 60.0b4 release also had much faster builds, and ended up
running in about the same time as Firefox 59. It turns out that we hit
several intermittent infrastructure failures in 60.0b4 that caused this
release to be slower than it could have been. Also, because we had
multiple releases running simultaneously, we did see some resource
contention for tasks like signing.
In addition to the faster builds and faster update tests, we're seeing a
lot of wins from increased parallelization that we can do now using
taskcluster's much more flexible scheduling engine. There's still more we
can do to speed up certain types of tasks, fix up intermittent failures,
and increase parallelization. I'm curious just how fast this pipeline can
Over the past few weeks we've hit a few major milestones in our project to
migrate all of Firefox's CI and release automation to
Firefox 60 and higher are now 100% on taskcluster!
At the end of March, our Release Operations and Project Integrity teams finished
migrating Windows tests onto new hardware machines, all running
taskcluster. That work was later uplifted to
that CI automation on beta would also be completely done using taskcluster.
This marked the last usage of buildbot for Firefox CI.
Periodic updates of blocklist and pinning data
Last week we switched
off the buildbot versions of the periodic update
jobs. These jobs keep the in-tree versions of blocklist, HSTS and HPKP
lists up to date.
These were the last buildbot jobs running on trunk branches.
And to wrap things up, yesterday the final patches
landed to migrate
partner repacks to taskcluster. Firefox 60.0b14 was built yesterday and shipped
today 100% using taskcluster.
A massive amount of work went into migrating partner repacks from
buildbot to taskcluster, and I'm really proud of the whole team for pulling
So, starting today, Firefox 60 and higher will be completely off
taskcluster and not rely on buildbot.
It feels really good to write that :)
We've been working on migrating Firefox to taskcluster for over three
years! Code archaeology is hard, but I think the first Firefox jobs to start
running in Taskcluster were the Linux64 builds, done by Morgan in bug
Into the glorious future
It's great to have migrated everything off of buildbot and onto
taskcluster, and we have endless ideas for how to improve things now that
we're there. First we need to spend some time cleaning up after ourselves
and paying down some technical debt we've accumulated. It's a good time to
start ripping out buildbot code from the tree as well.
We've got other plans to make release automation easier for other people to
work with, including doing staging releases on try(!!), making the nightly
release process more similar to the beta/release process, and for exposing
different parts of the release process to release management so that releng
doesn't have to be directly involved with the day-to-day release mechanics.
First, the good news - Developer Edition
will be the first release in nearly 10 years done without using buildbot.
This is an amazing milestone, and I'm incredibly proud of everybody who has
contributed to make this possible!
Long time, no update
How did we get here? It's been, uh, almost 6 months since I last posted
an update about our migration to Taskcluster.
In my last update, I described our plans for the end of 2017...
We're on track to ship builds produced in Taskcluster as part of the
56.0 release scheduled for late September. After that the only Firefox
builds being produced by buildbot will be for ESR52.
Meanwhile, we've started tackling the remaining parts of release
automation. We prioritized getting nightly and CI builds migrated to
Taskcluster, however, there are still parts of the release process
still implemented in Buildbot.
We're aiming to have release automation completely migrated
off of buildbot by the end of the year. We've already seen many
benefits from migrating CI to Taskcluster, and migrating the release
process will realize many of those same benefits.
(side note: 57 had the most complex update scenarios we've ever had to support for
Firefox...a subject for another post!)
Post-56.0, our release process was using Taskcluster exclusively for producing
the initial builds, and all the release process scheduling. We were still using
Buildbot for many of the post-build tasks, like l10n repacks, publishing
updates, pushing files to S3, etc. Once again we relied on the buildbot
to allow us to integrate existing buildbot components with the newer
taskcluster pipeline. I learned from Kim Moir that
this is a great example of the strangler
In the fall of 2017, we decided to begin migrating all of the scheduling logic
for release automation into taskcluster using the in-tree
scheduling system. We did this for a few reasons...
Having the release scheduling logic ride the trains is much more
maintainable. Previous to this we had an externally defined release pipeline
in our releasetasks repo. It
was hard to keep this repository in sync with changes required for beta/release
and ESR branches.
More importantly, having the release scheduling logic in-tree meant that we could then
rely on chain-of-trust
to verify artifacts produced by the release pipeline.
We felt that having the complete release pipeline defined in taskcluster would make it
easier for us to tackle the remaining buildbot bridge tasks in parallel.
We hit this milestone in the 58 cycle. Starting with 58.0b3, Firefox and Fennec releases
were completely scheduled using the in-tree taskgraph generation. We also migrated over the
l10n repacks at the same time, removing a longstanding source of problems where repacks
would fail when we first got to beta due to environmental differences between taskcluster
Still, as of 58, much of release automation still ran on buildbot, even if
Taskcluster was doing all the scheduling.
Since December, we've been working on removing these last few pieces of buildbot from the
release process. Progress was initially a bit slow, given
Austin and Christmas, but we've been hard at work
in the new year.
As I mentioned above, DevEdition
60.0b1 will be the first release in nearly 10 years done without using buildbot. The
rest of the 60 release cycle will follow suit, and once 60 hits the release channel, only
ESR52 will remain on buildbot!
Once the wizard completes you can change to that directory and start your project with npm start; That’s it! You don’t need any configuration changes. The minimum number of files for your project to start are now in place.
Neutrino is opinionated and has a bunch of good defaults that works for both production and development. You can always customize the configuration and/or create your own presets.
The Firefox code coverage diff viewer allows determining code coverage changes for added lines per changeset.
The main purpose of this tool is to determine if Release Management can use code coverage data to help them make risk analysis about individual changesets.
marco has been working on collecting the code coverage data from Mozilla’s continuos integration and developed the backend this app uses.
The main view shows you changesets from the last ten pushes on mozilla-central that: 1) have coverage data and 2) are not merges or backouts.
From there you can navigate to individual changesets. The diff viewer will only highlight added lines as having coverage or no coverage. There are also some added lines that will not have highlighting since it is non-code added lines.
Brief technical details
The app is using React written with JSX and ES8
The app is auto deployed to Heroku
The app’s state is normalized in case we wanted to use Redux
The app got promoted to beta this week and development on it will stop for this quarter. When this tool becomes clearly essential for Release Management we can reinvest on it.
It’s been a great experience working on this product with marco, ekyle and jmaher. Thank you all for your input.
Background story: I’ve been working with Mozilla full-time since 2009 (contributor in 2007 — intern in 2008). I’ve been working with the release engineering team, the automation team (A-team) and now within the Product Integrity organization. In all these years I’ve been blessed with great managers, smart and helpful co-workers, and enthusiastic support to explore career opportunities. It is an environment that has helped me flourish as a software engineer.
I will go straight to some of the benefits that I’ve enjoyed this year.
Three months at 100% of my salary. I did not earn bonus payouts during that time, however, it was worth the time I spent with my firstborn. We bonded very much during that time, I learned how to take care of my family while my wife worked, and I can proudly say that he’s a “daddy’s boy” :) (Not that I spoil him!).
Working from home 100% of the time
My favourite benefit. Period.
It really helps me as an employee, as I don’t enjoy commuting and I tend to talk a lot when I’m in the office. My family is very respectful of my work hours and I’m able to have deep-thought sessions in the comfort of my own home.
This is not a benefit that a lot of companies give, especially the bigger ones which expect you to relocate and come often to the office. I chuckle when I hear a company offer that their employees can work from home only a couple of days per week.
I appreciate that Mozilla allocaters some of their budget to pay for anything related to employee wellness (mental, spiritual & physical). Knowing that if I don’t use it I will lose it causes me to think about ways to apply the money to help me stay in shape.
This year, after a re-org and many years of doing the same work, I found myself in need of a new adventure — I get bored if I don’t feel as though I’m learning. With my manager’s support (thanks jmaher!), I embarked on a journey to become a front-end developer. Mozilla also supported me by paying for me to complete a React Nanodegree as part of the company’s learning budget.
We completed a huge milestone in July: starting in Firefox 56, we've been
doing all our nightly Firefox builds in Taskcluster.
This includes all Windows, macOS, Linux, and Android builds. You can
see all the builds and repacks on Treeherder.
In August, after 56 merged to Beta, we've also been doing our Firefox
Beta builds using Taskcluster. We're on track to be shipping Firefox 56, built from Taskcluster to release users at the end of September.
Windows and macOS each had their own challenges to get them ready to
build and ship to our nightly users.
We've had Windows builds running in Taskcluster for quite a while now.
The biggest missing piece stopping us from shipping these builds was
Windows builds end up being a bit complicated to sign.
First, each compiled .exe and .dll binary needs to be signed.
Signing binaries in windows changes their contents, and so we need to
regenerate some files that depend on the exact contents of binaries.
Next, we need to create packages in various formats: a "setup.exe" for
installing Firefox, and also MAR files for updates.
Each of these package formats in turn need to be signed.
In buildbot, this process was monolithic. All of the binary
generation and signing happened as part of the same build process. The
same process would also publish symbols to the symbol server and
publish updates to Balrog The downside of this monolithic process
is that it adds additional dependencies to the build, which is already
a really long process. If something goes wrong with signing, or
publishing updates, you don't want to have to restart a 2 hour build!
As part of our migration to Taskcluster, we decided that builds should
minimize their external dependencies. This means that the build task
produces only unsigned binaries, and it is the responsibility of
downstream tasks to sign them. We also wanted discrete tasks for
symbol and update submission.
One wrinkle in this approach is that the logic that defines how to
create a setup.exe package or a MAR file lives in tree. We didn't
want to run that code in the same context as the code that generates
Our solution to this was to create a sequence of build ->
signing -> repackage -> signing tasks. The signing tasks run in a
restricted environment while the build and repackage tasks have access to
the build system in order to produce the required artifacts. Using the
chain of trust, we can demonstrate that the artifacts weren't
tampered with between intermediate tasks.
Finally, we need to consider l10n repacks. We ship Firefox in over 90
locales. The repacking process downloads the en-US build and replaces
the English strings with localized strings. Each of these repacks
needs to be based on the signed en-US build. Each will also generate
its own setup.exe and complete MAR for updates.
macOS performance (and why your build directory matters)
Like Windows, we've had macOS builds running on Taskcluster for a long
time. Also like Windows, we had to solve signing for macOS.
However, the biggest blocker for the macOS build migration, was a
performance bug. Builds
produced on Taskcluster showed some serious performance regressions as
compared to the builds produced on buildbot.
Many very smart people looked at this bug since it was first
discovered in February. They compared library versions being used.
They compared compiler versions and compiler flags. They even
inspected the generated assembly code from both systems.
Mike Shal stumbled across the first clue to what was going on in
if he stripped the Taskcluster binaries, then the performance problems
disappeared! At this point we decided that we could go ahead and ship
these builds to nightly users, knowing that the performance regression
would disappear on beta and release.
Later on, Mike realized that it's not the presence or absence of
symbols in the binary that cause the performance hit, it's what
directory the builds are done in. On buildbot we build under
/builds/..., and on Taskcluster we build under /home/...
Read the bug for more gory details. This is definitely one of the
strangest bugs I've seen.
We learned quite a bit in the process of migrating Windows and macOS
nightly builds to Taskcluster.
First, we gained a huge amount of experience with the in-tree scheduling system.
There's a bit of a learning curve to climb, but it's an
extremely powerful and flexible system. Many kudos to Dustin for his work creating the foundation of
this system here. His blog post, "What's So Special About "In-Tree"?",
is a great explanation of why having this code as part of Firefox's
repository is so important.
One of the killer features of having all the scheduling logic live
in-tree is that you can do quite a bit of work locally, without
requiring any build infrastructure. This is extremely useful when
working on the complex build / signing / repackage sequence of tasks
described above. You can make your changes, generate a new task graph,
and inspect the results.
Once you're happy with your local changes, you can push them to try to
validate your local testing, get your patch reviewed, and then finally
landed in gecko. Your scheduling changes will take effect as soon as
they land into the repo. This made it possible for us to do a lot of
testing on another project branch, and then merge the code to central
once we were ready.
We're on track to ship builds produced in Taskcluster as part of the
56.0 release scheduled for late September. After that the only Firefox
builds being produced by buildbot will be for ESR52.
Meanwhile, we've started tackling the remaining parts of release
automation. We prioritized getting nightly and CI builds migrated to
Taskcluster, however, there are still parts of the release process
still implemented in Buildbot.
We're aiming to have release automation completely migrated
off of buildbot by the end of the year. We've already seen many
benefits from migrating CI to Taskcluster, and migrating the release
process will realize many of those same benefits.
Thank you for reading this far!
Members from the Release Engineering, Release Operations, Taskcluster,
Build, and Product Integrity teams all were involved in finishing up
this migration. Thanks to everyone involved (there are a lot of you!)
to getting us across the finish line here.
In particular, if you come across one of these fine individuals at the
office, or maybe on IRC, I'm sure they would appreciate a quick
5 things I would have loved knowing about Google Play
This part is more oriented to personal takeaways and a couple of questions that remain unanswered.
It is easy to publish an APK that is not localized
A few checks done in pushapk_scriptworker are actually because of previous errors. The number of locales is one of them. A few weeks after Fennec Aurora was shipped to Google Play, some users started to see their browser in English, even though their phone is set in a different locale and Aurora used to be in their own locales.
Like said previously, APKs were originally uploaded via a script. This was true also for the first Aurora APKs. Furthermore, automation on Taskcluster was first tried on Aurora. When I started to roll these bits out, there was a configuration issue. Pushapk_scriptworker picked the en-US-only-APK, instead of the multi-locale one. The fix was fairly simple: just change the APK locations.
Google Play has a lot of ways to detect wrong APKs: by signatures, by package name (none of the Firefox versions share the same one), by version code, and some others. Although, it doesn’t warn about a big change in:
Size. There is approximately a 10-MB-difference between a single locale build and a multi-locale one. Multi-locale APK are usually less than 40 MB. That APK shrunk by 25%, but not for good reasons.
The directory list of the archive. Manifest files were smaller, there were 90 times less files in some directories.
Of course, from one stable version to another, a lot of files may change in the archive. Asking Google to watch out for everything doesn’t seem reasonable. Although, when I started working on Google Play, it left me the feeling of being well-hardened. At that time, I thought Google Play did check the locales within an APK.
The consequence I take away: If your app has different build flavors (like single vs multi-locales), I recommend you write your own sanity checks, first.
Locales on the Play Store are independent from locales in APK
It might sound obvious after explaining of the previous issue, but this error message confused several Mozillians:
Tried to set recent changes text for APK version 12345678 for language es-US. Language is not associated with the app.
We hit it with a couple of locales, at pace of 1 per month, approximately. Like explained in the architecture part, locales are defined in an external service, stores_l10n. We have had many theories about it:
This locale is not supported by Google Play
The locale code (for instance “es-US”) expected by Google Play is not the one we provide. We may want to find the list of the locales officially supported
We don’t ship this locale within the APK, and the Play Store detects it
Actually, the fix ended up being simple. “Recent changes” is something we want to update on every new APK. But because the descriptions were more set in stone, they were not a part of the automated workflow. Actually, stores_l10n released had recently released new locales each time we hit the problem. That error message was actually telling us the descriptions of these new locales had never been uploaded. Once we figured this out, it became a part of the regular update workflow.
You cannot catch everything when you don’t commit transactions
The dry-run feature in MozApkPublisher, which just doesn’t commit the Google Play transaction, helps in detecting early failures. For instance: wrong version codes, wrong package names. Nevertheless, we have hit cases where dry runs went smoothly and we had to diagnose new issues at commit time.
Locales mismatch. The previous issue was not dectected at the upload time, likely for the reason that listings and the recent changes are 2 differentAPI calls. I assume, because you can call these API in whatever order within the same transaction, Google doesn’t check until the final state is fully known.
Permissions not granted to the account. Due to Firefox Aurora being stopped, we restricted the Google Play account in charge of Aurora to not be able to upload any APK anymore. Yet, we decided to publish Nightly to the same product as Aurora (in order to not strand users on a unmaintained version). Our tests went fine, Google Play accepted our APKs. But the day of the go-live, a new error came up saying we are not able to upload APKs after all. I don’t have any theory for this scenario, but if you do, I would love to hear it!
User fractions can also be specified on other tracks (but that’s not a feature)
Fennec Release 53.0 is the first version which was entirely published via Taskcluster. Mozilla also uses the rollout track on Release only. Beta is pushed to the production one (and that is actually something we are reviewing). Sadly, there was another configuration error: even though, the user fraction was specified, the configured track was the production one. Google Play didn’t raise any error (even at commit time), starting a full-throttled release. At that time, I contacted the Google Play support, to ask if it was possible to switch back to rollout. The person was very courteous. He explained they were not able to perform that kind of action. This is why they transmitted my request to the tech team, who will follow up by email.
In parallel, we have fixed the configuration error and implemented our own check in MozApkPublisher.
There is no way to rollback to previous APKs, even if you ask a human
The previous configuration error could have remained brieve, if somebody didn’t report what seemed like an important crash, 1 hour later. At that point, the Release Management team wanted to stall updates, in order to not spread the regression too much. We were still waiting on the support’s answer, but I reached out to them again since our request became different. I told the new contact I had about the previous issue, the new one, and the fact we were running against the clock. Sadly for us, the person only gave us the option to wait on the email follow up.
About 16 hours later, we got the email with the official answer:
Unfortunately, we cannot remove the APK in question, neither can we claw back the APK from the users that have already installed this update.
If you want to stop further users from installing this APK, then you need to make another release that deactivates this APK and add the APK that you want users to install instead.
Securely authenticate to it. It offers several ways to authenticate, including P12 certificates.
Securely store the authentication credentials.
Securely fetch the builds.
Based on Taskcluster
Mozilla, and more specifically the Release Engineering team, uses Taskcluster to implement the Firefox release workflow. The workflow can be summed up as:
Build Firefox with all supported locales (languages)
Sign these builds
Publish them everywhere (on https://archive.mozilla.org/, on https://www.mozilla.org/firefox/, via updates, etc.)
Each step is defined by its own set of tasks. These tasks are processed by specialized workers (represented by worker types). Those workers basically run a script against parameters given in the task definition.
Therefore, publishing to Google Play was a matter of creating a new Taskcluster task, which will be processed by a dedicated script and executed by its own worker type.
With some extra-security features
The aforementioned script must be bootstrapped to be integrated to the rest of Taskcluster. There are several ways to bootstrap scripts for Taskcluster. One of them is to create a docker image which Taskcluster pulls and run.
However, because of the needs stated above, we decided to go with a security-focused framework: scriptworker. Scriptworker was initially created to perform one of the most critical operation security-wise: sign builds. The framework has some great interesting features:
It securely downloads artifacts. Files are forced to be downloaded over https. Checksums and signatures are checked.
It validates that the task definitions were not changed between the time of creation and the time of execution. This prevents some tasks to be duplicated and edited to introduce extra-commands, which may be used to tamper a build, for instance.
It abstracts some of the Taskcluster details, thus you just have write a script (language-agnostic) that does what your worker has to do.
How pieces are wired together
Here’s a general view of how things are wired together:
1. The “decision task” creates a task for pushapk_scriptworker
2/3. Scriptworker polls for pending tasks and check their scopes. It downloads APKs via Chain of Trust. Scriptworker checks if the upstream tasks were altered.
4. Scriptworker defers valid tasks to pushapkscript. The latter validates APKs signatures, makes sure every APK architecture is present.
5. Pushapkscript calls MozApkPublisher with credentials and on-disk locations of APKs
6/7. MozApkPublisher verifies whether APKs contain several locales. It fetches localized strings displayed on Google Play Store (aka “listings” and “what’s new section”)
8. MozApkPublisher opens the Google play credentials.
9. MozApkPublisher publishes APKs, listings and “what’s new”
1. Task creation
There are many ways to submit the definition of a task to Taskcluster. For example, you can:
Call the Taskcluster API via one of the libraries (interesting if you want a bot that spawns tasks)
Generate the task via taskcluster/taskgraph that lives “in-tree”, that is to say, alonside the Firefox code.
Each of them was used at some point, but the ultimate solution relies on the last one. The taskgraph is a graph generator which, depending on given parameters, creates a graph of builds, tests and deployment tasks. Taskgraph generation is run on Taskcluster too, under what we commonly call “the decision task”. This solution benefits from being on hg.mozilla.org: it is versioned and only vouched people are able to modify it.
Moreover, taskgraph generates what is necessary for scriptworker to validate the task definitions and artifacts. To do so, taskgraph:
Creates a JSON representation of the graph,
Creates another JSON file that describes the artifacts generated (including the JSON of the graph) and signs it.
2. Scriptworker and new tasks
Scriptworker polls tasks from Taskcluster queue. That is actually one of the great things about Taskcluster: workers don’t have to open inbound (listening) ports. This reduces the potential surface of attack. Fetching new tasks is done via this bit of REST API which workers can poll. Speaking of which, workers are authenticated to Taskcluster, which prevents them from claiming a task that it isn’t meant to take.
Secure download of artifacts is done by the “Chain of Trust” feature of scriptworker. Once set up, if you define upstreamArtifacts within the task definition, scriptworker will:
Make sure the current task and its dependencies have not changed since its definition. This is done by comparing the JSON the taskgraph generated and the actual definition.
Check the signatures of every dependency, by looking at a special artifact Chain of Trust creates. This helps to verify no rogue worker processed a upstream task.
Download artifacts on the worker and verify the checksums.
Here starts the Android-specific bits. Pushapkscript performs some extra checks on the APKs:
APKs are signed with the correct certificates. In the previous steps, we have only checked the origin of the tasks. Now, we verify the APK itself. This may not sound extremely important because Google Play is vigilant about APK signatures and will refuse any APK for which the signature is not valid. However, it is safer to bail out before any outbound traffic is done to Google Play. Besides, with this check, Google acts as a second factor instead of being the only actor accountable for signatures.
No required processor architecture is missing, in order to upload them all in the same request. We have to publish them at the same time because some Android devices support several architectures. We have already had one big crash on these devices because an x86 APK was overseeded by its “brother in ARM”.
Pushapkscript knows about the location of the Google Play credentials (P12 certificates). It finally gives all the files (checked APKs and credentials) to MozApkPublisher.
4. MozApkPublisher, locales and Google Play
To be honest, MozApkPublisher could have been implemented within pushapkscript, but the split exists for historical reasons and still has a meaning today: this was the script Release Management used before this project got started. It also remains a way to let a human publish, in case of emergency.
It checks that APKs are multi-locale. We serve the same APK, which includes (almost) every locale in it. That’s a verification Google doesn’t do.
It also fetches the latest strings to display on the Play Store (like the localized descriptions). These strings are then posted on Google Play, alongside the APKs.
MozApkPublisher provides a dry-run mode thanks to the transaction mechanism exposed by Google’s API. Nothing is effectively published until the transaction is committed.
5. Pushapk_scriptworker: Scriptworker, Pushapkscript, and MozApkPublisher on the same machine
The 3 pieces live on the same Amazon EC2 instance, under the name pushapk_scriptworker. The configuration of this instance is managed by Puppet. The entire Puppet configuration is public on hg.mozilla.org, with the exception of secrets (Tascluster credentials, P12 certificates) which are encrypted on a seperate machine. Like the main Firefox repository, only vouched people can submit changes to the Puppet configuration.
5 things I would have loved knowing about Google Play
This is true for desktop (Windows, Linux, Mac) and Android. However, we don’t ship that often to every user. We have different channels, receiving updates at different frequencies:
Firefox Nightly (and Aurora until we stopped it) gets updated usually every day (unless an important breakage happens).
Firefox Beta and Developer Edition get two updates every week on Desktop. On Android, Beta is usually shipped once a week.
Firefox Release (also known as simply “Firefox”) gets one every six weeks.
About Firefox Aurora
You may have heard, Firefox Aurora has been discontinued in April 2017. Although, these blog posts will talk about it. The main reason is: Most of the experiments were done on Aurora, before it was stopped.
Today, the Android users who were on Aurora have been migrated to Nightly. New users are also given Nightly.
Why do we need Firefox for Android on app stores?
Unlike Firefox for desktop, Android apps have to be uploaded onto application stores (like Google Play Store). Otherwise, they have very low visibility. For instance, Firefox for Android Aurora (codenamed “Fennec Aurora”) was not on Google Play until September 2016, but it was downloadable from our official website (now redirected to Nightly). After we started publishing Aurora on Google Play, we increased our number of users by 5x.
Why are we automating the publication today?
Google didn’t offer a way to script a publication on Play Store, before July 2014. It had to be done manually, from their website. Around that time, a few people from Release Management implemented a first script. One person from the Release Management team ran it every time Beta or Release was ready, from his/her own machine. With Aurora being out, we now have several APKs (one per processor architecture/Android API level, which translates to 2 at the moment: one for x86 processors, the other for ARM) to publish each day.
The daily frequency was new for Fennec. It led to 2 concerns:
A human has to repeat the same task every day.
Pushing every day from a workstation increases the surface of security threats.
That is why we decided to make APK publication a part of the automated release workflow.
Yesterday, for the very first time, we started shipping Linux Desktop and
Android Firefox nightly builds from Taskcluster.
We now have a much more secure, resilient, and hackable nightly
build and release process.
It's more secure, because we have developed a chain of trust that allows
us to verify all generated artifacts back to the original decision task
and docker image. Signing is no longer done as part of the build process,
but is now split out into a discrete task after the build completes.
The new process is more resilient because we've split up the monolithic
build process into smaller bits: build, signing, symbol upload, upload to
CDN, and publishing updates are all done as separate tasks. If any one of
these fail, they can be retried independently. We don't have to re-compile
the entire build again just because an external service was temporarily
Finally, it's more hackable - in a good way! All the configuration files
for the nightly build and release process are contained in-tree. That
means it's easier to inspect and change how nightly builds are done.
Changes will automatically ride the trains to aurora, beta, etc.
Ideally you didn't even notice this change! We try and get these changes
done quietly, smoothly, in the background.
This is a giant milestone for Mozilla's Release Engineering and Taskcluster teams, and
is the result of many months of hard work, planning, coding, reviewing and
Big big thanks to jlund, Callek, mtabara, kmoir, aki, dustin, sfraser, jlorenzo,
coop, jmaher, bstack, gbrown, and everybody else who made this possible!
As 2016 winds down, I wanted to take some time to highlight all the work our Release Engineering
team has done this year. Personally, I really enjoy writing these retrospective posts. I think it's
good to spend some time remembering how far we've come in a year. It's really easy to forget what
you did last month, and 6 months ago seems like ancient history!
We added four people to our team this year!
Aki (:aki) re-joined us in January and has been working hard on developing a
security model for Taskcluster for sensitive tasks like signing and publishing
Rok (:garbas) started in February and has been working on modernizing our web
application framework development and deployment processes.
Johan (:jlorenzo) started in August and has been improving our release
automation, Balrog, and automatically publishing Android builds to the Google
Simon (:sfraser) started in October and has been improving monitoring of our
production systems, as well as getting his feet wet with our partial update
This year we released 104 desktop versions of Firefox, and 58 android versions
(including Beta, Release and ESR branches).
Several other releases this year were special for particular reasons, and required special efforts on our
part. We continued to provide SHA-1 signed installers for Windows XP users. We also produced a
special 47.0.2 release in order to try and
rescue users stuck on 47. We've never shipped a point release for a previous release branch before!
We've also generated partial updates to try and help users on 43.0.1 and 47.0.2 get faster updates to the latest version of
We couldn't have shipped so many releases so quickly last week if it weren't for release promotion. Previous to Firefox 46, our
release process would generate completely new builds after CI was finished. This wasted a lot of
time, and also meant we weren't shipping the exact binaries we had tested. Today, we ship the same
builds that CI has generated and tested. This saves a ton of time (up to 8 hours!), and gives us a
lot more confidence in the quality of the release.
This is one of those major kinds of changes that really transforms how we approach doing releases.
I can't really remember what it was like doing releases prior to release promotion!
We also added support in Shipit to allow starting a
release before all the en-US builds are done. This lets our Release Management
team kick off a release early, assuming all the builds pass. It saves a person
having to wait around watching Treeherder for the coveted green builds.
Windows in AWS
This year we completed our migration to AWS for Windows builds. 100% of our
Windows builds are now done in AWS. This means that we now have a much faster
and more scalable Windows build platform.
In addition, we also migrated most of the Windows 7 unittests to run in AWS.
Previously these were running on dedicated hardware in our datacentre. By
moving these tests to AWS, we again get a much more scalable test platform, but
we also freed up hardware capacity for other test platforms (e.g. Windows XP).
One of our major focus areas this year was migrating our infrastructure from Buildbot to
Taskcluster. As of today, we have:
Fully migrated Linux64 and Android debug builds and tests
2017 is looking like it's going to be another interesting (and busy!) year for
Our top priority is to finish the migration to Taskcluster. Hopefully by the
end of 2017, the only thing left on buildbot will be the ESR52 branch. This
will require some big changes to our release automation, especially for Fennec.
We're also planning to provide some automated processes to assist with the rest
of the release process. Releases still involve a lot of human to human
handoffs, and places where humans are responsible for triggering automation.
We'd like to provide a platform to be able to manage these handoffs more
reliably, and allow different pieces of automation to coordinate more
However, in practice, a serial (or monotonically increasing) key can be
handy to have around. I was reminded of this during a recent situation
where we (app developers & ops) needed to be highly confident that a
replica was consistent before performing a failover. (None of us had
access to the back end to see what the DB thought the replication lag
I've had the opportunity to attend the Beyond the Code conference for the past two years. This year, the venue moved to a location in Toronto, the last two events had been held in Ottawa. The conference is organized by Shopify who again managed to have a really great speaker line up this year on a variety of interesting topics. It was a two track conference so I'll summarize some of the talks I attended.
The conference started off with Anna Lambert of Shopify welcoming everyone to the conference.
The first speaker was Atlee Clark, Director of App and Developer relations at Shopify who discussed the wheel of diversity.
The wheel of diversity is a way of mapping the characteristics that you're born with (age, gender, gender expression, race or ethnicity, national origin, mental/physical ability), along with those that you acquire through life (appearance, education, political belief, religion, income, language and communication skills, work experience, family, organizational role). When you look at your team, you can map how diverse it is by colour. (Of course, some of these characteristics are personal and might not be shared with others). You can see how diverse the team is by mapping different characteristics with different colours. If you map your team and it's mostly the same colour, then you probably will not bring different perspectives together when you work because you all have similar backgrounds and life experiences. This is especially important when developing products.
This wheel also applies to hiring too. You want to have different perspectives when you're interviewing someone. Atlee mentioned when she was hiring for a new role, she mapped out the characteristics of the people who would be conducting the hiring interviews and found there was a lot of yellow.
So she switched up the team that would be conducting the interviews to include people with more diverse perspectives.
She finished by stating that this is just a tool, keep it simple, and practice makes it better.
The next talk was by Erica Joy, who is a build and release engineer at Slack, as well as a diversity advocate. I have to admit, when I saw she was going to speak at Beyond the Code, I immediately pulled out my credit card and purchased a conference ticket. She is one of my tech heroes. Not only did she build the build and release pipeline at Slack from the ground up, she is an amazing writer and advocate for change in the tech industry. I highly recommend reading everything she has written on Medium, her chapter in Lean Out and all her discussions on twitter. So fantastic.
Her talk at the conference was "Building a Diverse Corporate Culture: Diversity and Inclusion in Tech". She talked about how literally thousands of companies say they value inclusion and diversity. However, few talk about what they are willing to give up to order to achieve it. Are you willing to give up your window seat with a great view? Something else so that others can be paid fairly? She mentioned that change is never free. People need both mentorship and sponsorship in in order to progress in their career.
I really liked her discussion around hiring and referrals. She stated that when you're hire people you already know you're probably excluding equally or better qualified that you don't know. By default, women of colour are underpaid.
Pay gap for white woman, African American women and Hispanic women compared to a white man in the United States.
Some companies have referral system to give larger referral bonuses to people who are underrepresented in tech, she gave the example of Intel which has this in place. This is a way to incentivize your referral system so you don't just hire all your white friends.
The average white American has 91 white friends and one black friend so it's not very likely that they will refer non-white people. Not sure what the numbers are like in Canada but I'd guess that they are quite similar.
In addition, don't ask people to work for free, to speak at conferences or do diversity and inclusion work. Her words were "We can't pay rent with exposure".
Spend time talking to diversity and inclusion experts. There are people that have spent their entire lives conducting research in this area and you can learn from their expertise. Meritocracy is a myth, we are just lucky to be in the right place in the right time. She mentioned that her colleague Duretti Hirpa at Slack points out the need for accomplices, not allies. People that will actually speak up for others. So people feeling pain or facing a difficult work environment don't have to do all the work of fighting for change.
In most companies, there aren't escalation paths for human issues either. If a person is making sexist or racist remarks, shouldn't that be a firing offense?
If people were really working hard on diversity and inclusion, we would see more women and people of colour on boards and in leadership positions. But we don't.
She closed with a quote from Beyonce:
"If everything was perfect, you would never learn and you would never grow"
The next talk I attended was by Coraline Ada Ehmke, who is an application engineer at Github. Her talk was about the "Broken Promise of Open Source". Open source has the core principals of the free exchange of ideas, success through collaboration, shared ownership and meritocracy.
However, meritocracy is a myth. Currently, only 6% of Github users are women. The environment can be toxic, which drives a lot of people away. She mentioned that we don't have numbers for diversity in open source other than women, but Github plans to do a survey soon to try to acquire more data.
Gabriel Fayant from Assembly of Seven Generation's talk was entitled "Walking in Both Worlds, traditional ways of being and the world of technology". I found this quite interesting, she talked about traditional ceremonies and how they promote the idea of living in the moment, and thus looking at your phone during a drum ceremony isn't living the full experience. A question from the audience from someone who worked in the engineering faculty at the University of Toronto was how we can work with indigenous communities to share our knowledge of the technology and make youth both producers of tech, not just consumers.
If everything was perfect, you would never learn and you would never grow. Read more at: http://www.brainyquote.com/quotes/quotes/b/beyoncekno596349.html
f everything was perfect, you would never learn and you would never grow. Read more at: http://www.brainyquote.com/quotes/quotes/b/beyoncekno596349.html
The next talk was by Sandi Metz, entitled "Madame Santi tells your future". This was a totally fascinating look at the history of printing text from scrolls all the way to computers.
She gave the same talk at another conference earlier so you watch it here. It described the progression of printing technology from 7000 years ago until today. Each new technology disrupted the previous one, and it was difficult for those who worked on the previous technology to make the jump to work on the new one.
So according to Sandi, what is your future?
What you are working on now probably won't be relevant in 10 years
You will all die
All the people you love will die
Your body will start to fail you
Life is short
Tell people that you love them
Guard your health
Spend time with your kids
Get some exercise (she loves to bike)
We are bigger than tech
Community and schools need help
She gave the example of Habitat for Humanity where she volunteers
These organizations also need help to write code, they might not have the knowledge or time to do it right
The last talk I attended was by Sabrina Geremia of Google Canada. She talked about the factors that encourage a girl to consider computer science (encouragement, career perception, self-perception and academic exposure.)
I found that this talk was interesting but it focused a bit too much on the pipeline argument - that the major problem is that girls are not enrolling in CS courses. If you look at all the problems with environment, culture, lack of pay equity and opportunities for promotion due to bias, maybe choosing a career where there is more diversity is a better choice. For instance, law, accounting and medicine have much better numbers for these issues, despite there still being an imbalance.
At the end of the day, there was a panel to discuss diversity issues:
Moderator: Ariti Sharma, Shopify, Panelists: Mohammed Asaduallah, Format, Katie Krepps, Capital One Canada, Lateesha Thomas, Dev Bootcamp, Ramya Raghavan, Google, Kara Melton, TWG, Gladstone Grant, Microsoft Canada
Some of my notes from the panel
Be intentional about seeking out talent
Fix culture to be more diverse
Recruit from bootcamps. Better diversity today. Don't wait for universities to change the ratios.
Environment impacts retention
Conduct and engagement survey to see if underrepresented groups feel that their voices are being heard.
There is a need for sponsorship, not just mentoring. Define a role that doesn't exist at the company. A sponsor can make that role happen by advocating for it at higher levels
Mentors do better if matched with demographics. They will realize the challenges that you will face in the industry better than a white man who has never directly experienced sexism or racism.
Sponsors tend to be men due to the demographics of our industry
At Microsoft, when you reach a certain level your are expected to mentor an unrepresented person
Look at compensation and representation across diverse groups
Attrition is normal, it varies by region, especially acute in San Francisco.
Women leave companies at 2x the rate of men due to culture
You shouldn't stay at a place if you are burnt out, take care of yourself.
Compared to the previous two iterations of this conference, it seemed that this time it focused a lot more on solutions to have more diversity and inclusion in your company. The previous two conferences I attended seemed to focus more on technical talks by diverse speakers.
As a side note, there were a lot of Shopify folks in attendance because they ran the conference. They sent a bus of people from their head office in Ottawa to attend it. I was really struck at how diverse some of the teams were. I met group of women who described themselves as a team of "five badass women developers" 💯 As someone who has been the only woman on her team for most of her career, this was beautiful to see and gave me hope for the future of our industry. I've visited the Ottawa Shopify office several times (Mr. Releng works there) and I know that the representation of of their office doesn't match the demographics of the Beyond the Code attendees which tended to be more women and people of colour. But still, it is refreshing to see a company making a real effort to make their culture inclusive. I've read that it is easier to make your culture inclusive from the start, rather than trying to make difficult culture changes years later when your teams are all homogeneous. So kudos to them for setting an example for other companies.
Thank you Shopify for organizing this conference, I learned a lot and I look forward to the next one!
PyBay held their first local Python conference this last weekend
(Friday, August 19 through Sunday, August 21). What a great event! I
just wanted to get down some first impressions - I hope to do more after
the slides and videos are up.
Last night, I attended my first Ottawa Python Authors Meetup. It was the first time that I had attended despite wanting to attend for a long time. (Mr. Releng also works with Python and thus every time there's a meetup, we discuss who gets to go and who gets to stay home and take care of little Releng. It depends on if the talk to more relevant to our work interests.)
The venue was across the street from Confederation Park aka land of Pokemon.
I really enjoyed it. The people I chatted with were very friendly and welcoming. Of course, I ran into some people I used to work with, as is with any tech event in Ottawa it seems. Nice to catch up!
The venue had the Canada Council for the Arts as a tenant, thus the quintessentially Canadian art.
The speaker that night was Emily Daniels, developer from Halogen Software who spoke on Artificial Intelligence with Python. (Slides here, github repo here). She mentioned that she writes Java during the day but works on fun projects in Python at night. She started the talk by going through some examples of artificial intelligence on the web. Perhaps the most interesting one I found was a recurrent neural network called Benjamin which generates movie script ideas and was trained on existing sci-fi movies and movie scripts. Also, a short film called Sunspring was made of one of the generated scripts. The dialogue is kind of stilted but it is interesting concept.
After the examples, Emily then moved on to how it all works.
Deep learning is a type of machine learning that drives meaning out of data using a hierarchy of multiple layers that mimics the neural networks of our brain.
She then spoke about a project she wrote to create generative poetry from a RNN (recurrent neural network). It was based on a RNN tutorial that she heavily refactored to meet her needs. She went through the code that she developed to generate artificial prose from the works of H.G. Wells and Jane Austen. She talked about how she cleaned up the text to remove EOL delimiters, page breaks, chapters numbers and so on. And then it took a week to train it with the data.
She then talked about another example which used data from Jack Kerouac and Virginia Woolf novels, which she posts some of the results to twitter.
She also created a twitter account which posts generated text from her RNN that consumes the content of Walt Whitman and Emily Dickinson. (I should mention at this point that she chose these authors for her projects because copyrights have expired on these works and they are available on the Gutenberg project)
After the talk, she field a number of audience questions which were really insightful. There were discussions on the inherent bias in the data because it was written by humans that are sexist and racist. She mentioned that she doesn't post the results of the model automatically to twitter because some of them are really inappropriate since these novels since they learned from text that humans wrote who are inherently biased.
One thing I found really interesting is that Emily mentioned that she felt a need to ensure that the algorithms and data continue to exist, and that they were faithfully backed up. I began to think about all the Amazon instances that Mozilla releng had automatically killed that day as our capacity had peaked and declined. And of the great joy I feel ripping out code when we deprecate a platform. I personally feel no emotional attachment to bring down machines or deleting used code.
Perhaps the sense of a need for a caretaker for these recurrent neural networks and the data they create is related to the fact that the algorithms that output text that is a simulacrum for the work of an author that we enjoy reading. And perhaps that is why we maybe we aren't as attached to a ephemeral pool of build machines as we are are to our phones. Because the phone provides a sense human of connection to the larger world when we may be sitting alone.
Thank you Emily for the very interesting talk, to the Ottawa Python Authors Group for organizing the meetup, and Shopify for sponsoring the venue. Looking forward to the next one!
I received this very kind email in my inbox this morning.
"David Williams has expired your commit rights to the eclipse.platform.releng project. The reason for this change is:
We have all known this day would come, but it does not make it any easier. It has taken me four years to accept that Kim is no longer helping us with Eclipse. That is how large her impact was, both on myself and Eclipse as a whole. And that is just the beginning of why I am designating her as "Committer Emeritus". Without her, I humbly suggest that Eclipse would not have gone very far. Git shows her active from 2003 to 2012 -- longer than most! She is (still!) user number one on the build machine. (In Unix terms, that is UID 500). The original admin, when "Eclipse" was just the Eclipse Project.
She was not only dedicated to her job as a release engineer she was passionate about doing all she could to make other committer's jobs easier so they could focus on their code and specialties. She did (and still does) know that release engineering is a field of its own; a specialized profession (not something to "tack on" at the end) that just anyone can do) and good, committed release engineers are critical to the success of any project.
For anyone reading this that did not know Kim, it is not too late: you can follow her blog at
You will see that she is still passionate about release engineering and influential in her field.
And, besides all that, she was (I assume still is :) a well-rounded, nice person, that was easy to work with! (Well, except she likes running for exercise. :)
Thanks, Kim, for all that you gave to Eclipse and my personal thanks for all that you taught me over the years (and I mean before I even tried to fill your shoes in the Platform).
We all appreciate your enormous contribution to the success of Eclipse and happy to see your successes continuing.
To honor your contributions to the project, David Williams has nominated you for Committer Emeritus status."
Thank you David! I really appreciate your kind words. I learned so much working with everyone in the Eclipse community. I had the intention to contribute to Eclipse when I left IBM but really felt that I have given all I had to give. Few people have the chance to contribute to two fantastic open source communities during their career. I'm lucky to have that opportunity.
My IBM friends made this neat Eclipse poster when I left. The Mozilla dino displays my IRC handle.
Firefox has it's own built-in update system. The update system supports
2 types of updates: complete and incremental. Completes can be
applied to any older version, unless there are some incompatible changes
in the MAR format.
Incremental updates can be applied only to a release they were generated
Usually for the beta and release channels we generate incremental
updates against 3-4 versions. This way we try to minimize bandwidth
consumption for our end users and increase the number of users on the
latest version. For Nightly and Developer Edition builds we generate 5
incremental updates using funsize.
Both methods assume that we know ahead of time what versions should be
used for incremental updates. For releases and betas we use ADI stats to be as precise as
possible. However, these methods are static and don't use real-time
The idea to generate incremental updates on demand has been around for
ages. Some of the challenges are:
Acquiring real-time (or close to real-time) data for making decisions
on incremental update versions
Size of the incremental updates. If the size is very close to the size
of the corresponding complete, there is reason to serve incremental
updates. One of the reasons is that the that the updater tries to use
the incremental update first, and then falls back to the complete in
case if something goes wrong. In this case the updater downloads both
the incremental and the complete.
Ben and I talked about this today
and to recap some of the ideas we had, I'll put them here.
We still want to "pre-seed" most possible incremental updates before
we publish any updates
Whenever Balrog serves a
complete-only update, it should generate a structured log entry and/or
an event to be consumed by some service, which should contain all
information required to generate a incremental update.
The "new system" should be able to decide if we want to discard
incremental update generation, based on the size. These decisions
should be stored, so we don't try to generate incremental update again
next time. This information may be stored in Balrog to prevent further
Before publishing the incremental update, we should test if they can
be applied without issues, similar to the update verify tests we run
for releases, but without hitting Balrog. After they pass this test,
we can publish them to Balrog and check if Balrog returns expected XML
with partial info in it.
Minimize the amount of served completes, if we plan to generate
incremental updates. One of the ideas was to modify the client to
support responses like "Come in 5 minutes, I may have something for
The only remaining thing is to implement all these changes. :)
tl;dr: We’ll be shutting down the Firefox mirrors on Bitbucket.
A long time ago we started an experiment to see if there was any
support for developing Mozilla products on social coding sites. Well,
the community-at-large has spoken, with the results many predicted:
Migrated to a new build or continuous integration system
Implemented a new release or deployment pipeline
Implemented tooling to simplify managing your apps in a mobile store
Significantly reduced build time with parallelization or some other interesting optimization!
Moved your build and test system to containers
Refactored your infrastructure code for a live production environment
... we'd love to see your submission to the workshop
We'd like to encourage people new to speaking to apply, as well as those from underrepresented groups in tech. We'd love to hear from some new voices and new companies !
Submissions are due July 1, 2016. If you have questions on of the submission process, topics to submit, or anything else, I'm happy to help! I'm kmoir and I work at mozilla.com or contact me on twitter. Submit early and often!
Last week I attended DevOpsDays Toronto. It was my first time attending a DevOpsDays event and it was quite interesting. It was held at CBC's Glenn Gould studios which is a quick walk from the Toronto Island airport where I landed after an hour flight from Ottawa. This blog post is an overview of some of the talks at the conference.
Glenn Gould Studios, CBC, Toronto.
Statue of Glenn Gould outside the CBC studios that bear his name.
The day started out with an introduction from the organizers and a brief overview of history of DevOps days. They also made a point about reminding everyone that they had agreed to the code of conduct when they bought their ticket. I found this explicit mention of the code of conduct quite refreshing.
The first talk of the day was John Willis, evangelist at Docker. He gave an overview of the state of enterprise devops. I found this a fresh perspective because I really don't know what happens in enterprises with respect to DevOps since I have been working in open source communities for so long. John providing an overview of what DevOps encompasses.
DevOps is a continuous feedback loop.
He talked a lot about how empathy is so important in our jobs. He mentions that at Netflix has a slide deck that describes company culture. He doesn't know if this is still the case, but it he had heard that if you hadn't read the company culture deck and show up for an interview at Netflix, you would be automatically disqualified for further interviews. Etsy and Spotify have similar open documents describing their culture.
He gave us some reading to do. I've read the "Release It!" book which is excellent and has some fascinating stories of software failure in it, I've added the other books to my already long reading list.
He stated that it's a long standing mantra that you can have two of either fast, cheap or good but recent research shows that today we can many changes quickly, and if there is a failure the mean time to recovery is short.
He left us with some more books to read.
The second talk was a really interesting talk by Hany Fahim, CEO of VM Farms. It was a short mystery novella describing how VM Farms servers suddenly experienced a huge traffic spike when the Brazilian government banned Whatsapp as a result of a legal order. I love a good war story.
Hany discussed one day VMfarms suddenly saw a huge increase in traffic.
This was a really important point. When your system is failing to scale, it's important to decide if it's a valid increase in traffic or malicious.
Looking on twitter, they found that a court case in Brazil had recently ruled that Whatsup would be blocked for 48 hours. Users started circumventing this block via VPN. Looking at their logs, they determined that most of the traffic was resolving to ip addresses from Brazil and that there was a large connection time during SSL handshakes.
In conclusion, making changes to use multi-core HAProxy fixed a lot of issues. Also, twitter was and continues to be a great source of information on activity that is happening in other countries. Whatsapp was returned to service and then banned a second time, and their servers were able to keep up with the demand.
After lunch, we were back to to more talks. The organizers came on stage for a while to discuss the afternoon's agenda. They also remarked that one individual had violated the code of conduct and had been removed from the conference. So, the conference had a code of conduct and steps were taken if it was violated.
Next up, Bridget Kromhout from Pivotal gave a talk entitled Containers will not Fix your Broken Culture. I first saw Bridget speak at Beyond the Code in Ottawa in 2014 about scaling the streaming services for Drama Fever on AWS. At the time, I was moving our mobile test infrastructure to AWS so I was quite enthralled with her talk because 1) it was excellent 2) I had never seen another woman give a talk about scaling services on AWS. Representation matters.
The summary of the talk last week was that no matter what tools you adopt, you need to communicate with each other about the cultural changes are required to implement new services. A new microservices architecture is great, but if these teams that are implementing these services are not talking to each other, the implementation will not succeed.
Bridget pointing out that the technology we choose to implement is often about what is fashionable.
Shoutout to Jennifer Davis' and Katherine Daniel's Effective DevOps book. (note - I've read it on Safari online and it is excellent. The chapter on hiring is especially good)
Loved this poster about the wall of confusion between development and operations.
In the afternoon, there were were lightning talks and then open spaces. Open spaces are free flowing discussions where the topic is voted upon ahead of time. I attended ones on infrastructure automation, CI/CD at scale and my personal favourite, horror stories. I do love hearing how distributed system can go down and how to recover. I found that the conversations were useful but it seemed like some of them were dominated by a few voices. I think it would be better if the person that suggested to topic for the open space also volunteered to moderate the discussion.
He started by giving some key platform characteristics. Stores on Shopify have flash sales that have traffic spikes so they need to be able to scale for these bursts of traffic.
From commit to deploy in 10 minutes. Everyone can deploy. This has two purposes: Make sure the developer stays involved in the deploy process. If it only takes 10 minutes, they can watch to make sure that their deploy succeeds. If it takes longer, they might move on to another task. Another advantage of this quick deploy process is that it can delight customers with the speed of deployment. They also deploy in small batches to ensure that the mean time to recover is small if the change needs to be rolled back.
BuildKite is a third party build and test orchestration service. They wrote a tool called Scrooge that monitors the number of EC2 nodes based on current demand to reduce their AWS bills. (Similar to what Mozilla releng does with cloud-tools)
Shopify uses a open source orchestration tool called ShipIt. I was sitting next to my colleague Armen at the conference and he started chuckling at this point because at Mozilla we also wrote an application called ship-it which release management uses to kick off Firefox releases. Shopify also has a overall view of the ship it deployment process which allows developers to see the percentages of nodes where their change has been deployed. One of the questions after the talk was why they use AWS for their deployment pipeline when they have use machines in data centres for their actual customers. Answer: They use AWS where resilency is not an issue.
Building containers is computationally expensive. He noted that a lot of engineering resources went into optimizing the layers in the Docker containers. To isolate changes to the smallest layer. They build service called Locutus to build the containers on commit, and push to a registry. It employs caching to make the builds smaller.
One key point that John also mentioned is that they had a team dedicated to optimizing their deployment pipeline. It is unreasonable to expect that developers working on the core Shopify platform to also optimize the pipeline.
It was an interesting perspective. I've seen quite a few talks about bringing devops culture and practices to the operations side of the house, but the perspective of teaching developers about it is discussed less often.
He emphasized the need to empower developers to use DevOp practices by giving them tools, and showing them how to use them. For instance, if they needed to run docker to test something, walk them through it so they will know how to do it next time.
The final talk I'll mention is by Will Weaver. He talks about how it is hard to show prospective clients how he had CI and tests experience when that experience is not open to the public. So he implemented tests and CI for his dotfiles on github.
He had excellent advice on how to work on projects outside of work to showcase skills for future employers.
Diversity and Inclusion
As an aside, whenever I'm at a conference I note the number of people in the "not a white guy" group. This conference had an all men organizing committee but not all white men. (I recognize the fact that not all diversity is visible i.e. mental health, gender identity, sexual orientation, immigration status etc) They was only one woman speaker, but there were a few non-white speakers. There were very few women attendees. I'm not sure what the process was to reach out to potential speakers other than the CFP.
There were slides that showed diverse developers which was refreshing.
Loved Roderick's ops vs dev slide.
I learned a lot at the conference and am thankful for all the time that the speakers took to prepare their talks. I enjoyed all the conversations I had learning about the challenges people face in the organizations implementing continuous integration and deployment. It also made me appreciate the culture of relentless automation, continuous integration and deployment that we have at Mozilla.
I don't know who said this during the conference but I really liked it
Shipping is the heartbeat of your company
It was interesting to learn how all these people are making their companies heart beat stronger via DevOps practices and tools.
We're delighted to have Francis Kang and Connor Sheehan join the Mozilla release engineering team as summer interns. Francis is studying at the University of Toronto while Connor attends McMaster University in Hamilton, Ontario. We'll have another intern (Anthony) join us later on in the summer who will be working from our San Francisco office.
They are both already off to a great start and have pull requests merged into production that fixed some release promotion issues. Their code was used in the Firefox 47.0 beta 5 release promotion that we ran last night so their first week was quite productive.
Mentoring an intern provides an opportunity to see the systems we run from a fresh perspective. They both have lots of great questions which makes us revisit why design decisions were made, could we do things better? Like all teaching roles, I always find that I learn a tremendous amount from the experience, and hope they have fun learning real world software engineering concepts with respect to running large distributed systems.
In my previous post I
introduced the new release process we have been adopting in the 46.0 release
Release build promotion has been in production since Firefox 46.0 Beta 1. We
have discovered some minor issues; some of them are already fixed, some still
One of the visible bugs is
Bug 1260892. We
generate a big
which should contain all important checksums. With numerous changes to the
process the file doesn't represent all required files anymore. Some files are
missing, some have different names.
We are working on fixing the bug, but you can use the following work around to
verify the files.
Hello from Release Engineering! Once a month we highlight one of our projects
to help the Mozilla community discover a useful tool or an interesting
contribution opportunity. This month's project is Release Build Promotion.
What is Release Build Promotion?
Release build promotion (or "build promotion", or "release promotion" for short),
is the latest release pipeline for Firefox being developed by Release
Engineering at Mozilla.
Release build promotion starts with the builds produced and tested by CI (e.g.
on mozilla-beta or
We take these builds, and use them as the basis to generate all our l10n repacks,
partial updates, etc. that are required to release Firefox. We "promote"
the CI builds to the release channel.
How is this different?
The previous release pipeline also started with builds produced and tested by
CI. However, when it came time to do a release, we would create an entirely new
set of builds with slightly different build configuration. These builds would
not get the regular CI testing.
Release build promotion improves the process by removing the second set of
builds. This drastically improves the total time to do a release, and also
increases our confidence in our products since we now are shipping exactly
what's been tested. We also improve visibility of the release process; all the
tasks that make up the release are now reported to Treeherder along with the
corresponding CI builds.
Release build promotion is in use for Firefox desktop starting with the 46 beta
cycle. ESR and release branches have not yet been switched over.
Firefox for Android is also not yet handled. We plan to have this ready for
One of the major reasons of this project was our release end-to-end times. I
pulled some data to compare:
One of the Firefox 45 betas took almost 12 hours
One of the Firefox 46 betas took less than 3 hours
Support Firefox for Android
Support release and ESR branches
Extend this process back to the aurora and nightly channels
Can I contribute?
Yes! We still have a lot of things to do and welcome everyone to contribute.
Bug 1253369 - Notifications on release promotion events.
(No bug yet) Redesign and modernize Ship-it
to reflect the new release work flow. This will include new UI, multiple
sign-offs, new release-runner, etc.
It was a busy week with many releases in flight, as well as preparation for running beta 1 with release promotion next week. We also are in the process of adding more capacity to certain test platform pools to lower wait times given all the new e10s tests that have been enabled.
Improve Release Pipeline:
Nick ran a staging release for 46.0b1 to check for issues before the merge, preventing some bustage for Fennec and ensuring we can fall back to the old system if any unexpected issues show up with release promotion
Dustin deployed a new version of the TaskCluster tools/login system with much improved UI for handling signing in and out and editing clients and roles. He also simplified the existing roles, with the result that the set of roles now fits on one screen, and is entirely composed of human-readable names. All of this works toward two important goals: building a sign-in system that is useful and usable by all mozillians; and configuring the access-control system to give everyone their appropriate permissions and no more.
The releases calendar is getting busier as we get closer to the end of the cycle. Many releases were shipped or are still in-flight:
Fennec 45.0 (in-progress)
Firefox 45.0 (in-progress) - we shipped the RC to the beta channel
It was a busy week for release engineering as several team members travelled to the Vancouver office to sprint on the release promotion project. The goal of the release promotion project is to promote continuous integration builds to release channels, allowing us to ship releases much more quickly.
Improve Release Pipeline:
Chris, Jordan, Callek (remotely), Kim, Mihai and Rail had a sprint on Release Promotion. We made so much progress on this project that we decided to use the new process for Firefox 46.0b1. https://bugzil.la/1118794 So many green jobs!
Every new year gives you an opportunity to sit back, relax,
have some scotch and re-think the passed year. Holidays give
you enough free time. Even if you decide to not take a vacation around
the holidays, it's usually calm and peaceful.
This time, I found myself thinking mostly about productivity, being
effective, feeling busy, overwhelmed with work and other related topics.
When I started at Mozilla (almost 6 years ago!), I tried to apply all my
GTD and time management knowledge and techniques. Working remotely and
in a different time zone was an advantage - I had close to zero
interruptions. It worked perfect.
Last year I realized that my productivity skills had faded away somehow.
40h+ workweeks, working on weekends, delivering goals in the last week
of quarter don't sound like good signs. Instead of being productive I
"Every crisis is an opportunity". Time to make a step back and reboot
myself. Burning out at work is not a good idea. :)
Here are some ideas/tips that I wrote down for myself you may found
Morning exercises. A 20-minute walk will wake your brain up and
generate enough endorphins for the first half of the day.
Meditation. 2x20min a day is ideal; 2x10min would work too. Something
like calm.com makes this a peace of cake.
Task #1: make a daily plan. No plan - no work.
Don't start your day by reading emails. Get one (little) thing done
first - THEN check your email.
Try to define outcomes, not tasks. "Ship XYZ" instead of "Work on XYZ".
Meetings are time consuming, so "Set a goal for each meeting".
Consider skipping a meeting if you don't have any goal set, unless it's a
beer-and-tell meeting! :)
Constantly ask yourself if what you're working on is important.
3-4 times a day ask yourself whether you are doing something towards
your goal or just finding something else to keep you busy. If you want
to look busy, take your phone and walk around the office with some
papers in your hand. Everybody will think that you are a busy person!
This way you can take a break and look busy at the same time!
Take breaks! Pomodoro technique has this option
built-in. Taking breaks helps not only to avoid RSI, but also
keeps your brain sane and gives you time to ask yourself the questions
mentioned above. I use Workrave on my
laptop, but you can use a real kitchen timer instead.
Wear headphones, especially at office. Noise cancelling ones are even
better. White noise, nature sounds, or instrumental music are your
Make sure you enjoy your work environment. Why on the earth would you
spend your valuable time working without joy?!
De-clutter and organize your desk. Less things around - less
Desk, chair, monitor, keyboard, mouse, etc - don't cheap out on them.
Your health is more important and expensive. Thanks to mhoye for this advice!
Don't check email every 30 seconds. If there is an emergency, they
will call you! :)
Reward yourself at a certain time. "I'm going to have a chocolate at
11am", or "MFBT at 4pm sharp!" are good examples. Don't forget, you
are Pavlov's dog too!
Don't try to read everything NOW. Save it for later and read in a
Capture all creative ideas. You can delete them later. ;)
Prepare for next task before break. Make sure you know what's next, so
you can think about it during the break.
This is my list of things that I try to use everyday. Looking forward to
I would appreciate your thoughts this topic. Feel free to comment or
send a private email.
I'm not a manager (but I interview Mozilla releng candidates)
I'm not looking for a new job.
These are just my observations after working in the tech industry for a long time.
I'm kind of a resume and interview nerd. I like helping friends fix their resumes and write amazing cover letters. In the past year I've helped a few (non-Mozilla) friends fix up their resumes, write cover letters, prepare for interviews as they search for new jobs. This post will discuss some things I've found to be helpful in this process.
Preparation Everyone tends to jump into looking at job descriptions and making their resume look pretty. Another scenario is that people have a sudden realization that they need to get out of their current position and find a new job NOW and frantically start applying for anything that matches their qualifications. Before you do that, take a step back and make a list of things that are important to you. For example, when I applied at Mozilla, my list was something like this
learn release engineering at scale + associated tools/languages
work on a team of release engineers (not be the only one)
good team dynamics - people happy to share knowledge and like to ship
work in an organization where release engineering is valued for increasing the productivity of the organization as a whole and is funded (hardware/software/services/training) accordingly
support to attend and present at conferences
People spend a lot of time at work. Life is too short to be unhappy every day. Writing a list of what is important serves as a checklist to when you are looking at job descriptions and immediately weed out the ones that don't match your list.
People tend focus a lot on the technical skills they want to use or new ones you want to learn. You should also think about what kind of culture where you want to work. Do the goals and ethics of the organization align with your own? Who will you be working with? Will you enjoy working with this team? Are you interested in remote work or do you want to work in an office? How will a long commute impact or relocation your quality of life? What is the typical career progression of someone in this role? Are there both management and technical tracks for advancement?
To summarize, itemize the skills you'd like to use or learn, the culture of the company and the team and why you want to work there.
Your cover letter should succinctly map your existing skills to the role you are applying for and convey enthusiasm and interest. You don't need to have a long story about how you worked on a project at your current job that has no relevance to your potential new employer. Teams that are looking to hire have problems to solve. Your cover letter needs to paint a picture that your have the skills to solve them.
Picture by Jim Bauer - Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Generic (CC BY-NC-ND 2.0) https://www.flickr.com/photos/lens-cap/10320891856/sizes/l
Refactoring your resume
Developers have a lot of opportunities these days, but if you intend to move from another industry, into a tech company, it can be more tricky. The important thing is to convey the skills you have in a a way that people can see they can be applied to the problems they want to hire you to fix.
Many people describe their skills and accomplishments in a way that is too company specific. They may have a list of acronyms and product names on their resume that are unlikely to be known by people outside the company. When describing the work you did in a particular role, describe the work that you did in a that is measurable way that highlights the skills you have. An excellent example of a resume that describes the skills that without going into company specific detail is here. (Julie Pagano also has a terrific post about how she approached her new job search.)
Another tip is to leave out general skills that are very common. For instance, if you are a technical writer, omit the fact that you know how to use Windows and Word and focus on highlighting your skills and accomplishments.
Non-technical interview preparation
Every job has different technical requirements and there are many books and blog posts on how to prepare for this aspect of the interview process. So I'm going to just cover the non-technical aspects.
When I interview someone, I like to hear lots of questions. Questions about the work we do and upcoming projects. This indicates that have taken the time to research the team, company and work that we do. It also shows that enthusiasm and interest.
Here is a list suggestions to prepare for interviews
1. Research the company make a list of relevant questions Not every company is open about the work that they do, but most will be have some public information that you can use to formulate questions during the interviews. Do you know anyone you can have coffee or skype with to who works for the company and can provide insight? What products/services do the company produce? Is the product nearing end of life? If so, what will it be replaced by? What is the companies market share, is it declining, stable or experiencing growth? Who are their main competitors? What are some of the challenges they face going forward? How will this team help address these challenges?
2. Prepare a list of questions for every person that interviews you ahead of time Many companies will give you the list of names of people who will interview you. Have they recently given talks? Watch the videos online or read the slides. Does the team have github or other open repositories? What are recent projects are they working on? Do they have a blog or are active on twitter? If so, read it and formulate some questions to bring to the interview. Do they use open bug tracking tools? If so, look at the bugs that have recent activity and add them to the list of questions for your interview. A friend of mine read the book of a person that interviewed him had written and asked questions about the book in the interview. That's serious interview preparation!
Photo by https://www.flickr.com/photos/wocintechchat/ https://www.flickr.com/photos/wocintechchat/22506109386/sizes/l
3. Team dynamics and tools Is the team growing or are you hiring to replace somebody who left? What's the onboarding process like? Will you have a mentor? How is this group viewed by the rest of the company? You want to be in a role where you can make a valuable contribution. Joining a team where their role is not valued by the company or not funded adequately is a recipe for disappointment. What does a typical day look like? What hours do people usually work? What tools do people use? Are there prescribed tools or are you free to use what you'd like?
4. Diversity and Inclusion If you're a member of an underrepresented group in tech, the numbers are lousy in this industry with some notable exceptions. And I say that while recognizing that I'm personally in the group that is the lowest common denominator for diversity in tech.
I don't really have good advice for this area other than do your research to ensure you're not entering a toxic environment. If you look around the office where you're being interviewed and nobody looks like you, it's time for further investigation. Look at the company's website - is the management team page white guys all the way down? Does the company support diverse conferences, scholarships or internships? Ask on a mailing list like devchix if others have experience working at this company and what it's like for underrepresented groups. If you ask in the interview why there aren't more diverse people in the office and they say something like "well, we only hire on merit" this is a giant red flag. If the answer is along the lines of "yes, we realize this and these are the steps we are taking to rectify this situation", this is a more encouraging response.
A final piece of advice, ensure that you meet with your manager that you're going to report to as part of your hiring process. You want to ensure that you have rapport with them and can envision a productive working relationship.
What advice do you have for people preparing to find a new job?
You may have noticed that Windows has had no updates for Nightly for the last week or so. We’ve had a few issues with signing the binaries as part of moving from a SHA-1 certificate to SHA-2. This needs to be done because Windows won’t accept SHA-1 signed binaries from January 1 2016 (this is tracked in bug 1079858).
Updates are now re-enabled, and the update path looks like this
older builds → 20151209095500 → latest Nightly
Some people may have been seeing UAC prompts to run the updater, and there could be one more of those when updating to the 20151209095500 build (which is also the last SHA-1 signed build). Updates from that build should not cause any UAC prompts.
One of the challenges of maintaining a legacy system is deciding how much
effort should be invested in improvements. Since modern vcs-sync is
“right around the corner”, I have been avoiding looking at improvements
to legacy (which is still the production version for all build farm use
While adding another gaia branch, I noticed that the conversion path for
active branches was both highly variable and frustratingly long. It
usually took 40 minutes for a commit to an active branch to trigger a
build farm build. And worse, that time could easily be 60 minutes if the
stars didn’t align properly. (Actually, that’s the conversion time for
git -> hg. There’s an additional 5-7 minutes, worst case, for b2g_bumper to
generate the trigger.)
The full details are in bug 1226805, but a simple rearrangement of
the jobs removed the 50% variability in the times and cut the average
time by 50% as well. That’s a savings of 20-40 minutes per gaia push!
Moral: don’t take your eye off the legacy systems – there still can be
some gold waiting to be found!
November 13th, I attended the USENIX Release Engineering Summit in Washington, DC. This summit was along side the larger LISA conference at the same venue. Thanks to Dinah McNutt, Gareth Bowles, Chris Cooper, Dan Tehranian and John O'Duinn for organizing.
I gave two talks at the summit. One was a long talk on how we have scaled our Android testing infrastructure on AWS, as well as a look back at how it evolved over the years.
Picture by Tim Norris - Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Generic (CC BY-NC-ND 2.0) https://www.flickr.com/photos/tim_norris/2600844073/sizes/o/
I gave a second lightning talk in the afternoon on the problems we face with our large distributed continuous integration, build and release pipeline, and how we are working to address the issues. The theme of this talk was that managing a large distributed system is like being the caretaker for the water, or some days, the sewer system for a city. We are constantly looking system leaks and implementing system monitoring. And probably will have to replace it with something new while keeping the existing one running.
Picture by Korona Lacasse - Creative Commons 2.0 Attribution 2.0 Generic https://www.flickr.com/photos/korona4reel/14107877324/sizes/l
In preparation for this talk, I did a lot of reading on complex systems design and designing for recovery from failure in distributed systems. In particular, I read Donatella Meadows' book Thinking in Systems. (Cate Huston reviewed the book here). I also watched several talks by people who talked about the challenges they face managing their distributed systems including the following:
I'd also like to thank all the members of Mozilla releng/ateam who reviewed my slides and provided feedback before I gave the presentations.
The attendees of the summit attended the same keynote as the LISA attendees. Jez Humble, well known for his Continuous Delivery and Lean Enterprise books provided a keynote on Lean Configuration Management which I really enjoyed. (Older version of slides from another conference, are available here and here.)
In particular, I enjoyed his discussion of the cultural aspects of devops. I especially like that he stated that "You should not have to have planned downtime or people working outside business hours to release". He also talked a bit about how many of the leaders that are looked up to as visionaries in the tech industry are known for not treating people very well and this is not a good example to set for others who believe this to be the key to their success. For instance, he said something like "what more could Steve Jobs have accomplished had he treated his employees less harshly".
Another concept he discussed which I found interesting was that of the strangler application. When moving from a large monolithic application, the goal is to split out the existing functionality into services until the originally application is left with nothing. Exactly what Mozilla releng is doing as we migrate from Buildbot to taskcluster.
At the release engineering summit itself, Lukas Blakk from Pinterest gave a fantastic talk Stop Releasing off Your Laptop—Implementing a Mobile App Release Management Process from Scratch in a Startup or Small Company. This included grumpy cat picture to depict how Lukas thought the rest of the company felt when that a more structured release process was implemented.
Lukas also included a timeline of the tasks that implemented in her first six months working at Pinterest. Very impressive to see the transition!
Another talk I enjoyed was Chaos Patterns - Architecting for Failure in Distributed Systems by Jos Boumans of Krux. (Similar slides from an earlier conference here). He talked about some high profile distributed systems that failed and how chaos engineering can help illuminate these issues before they hit you in production.
For instance, it is impossible for Netflix to model their entire system outside of production given that they consume around one third of nightly downstream bandwidth consumption in the US.
Evan Willey and Dave Liebreich from Pivotal Cloud Foundry gave a talk entitled "Pivotal Cloud Foundry Release Engineering: Moving Integration Upstream Where It Belongs". I found this talk interesting because they talked about how the built Concourse, a CI system that is more scaleable and natively builds pipelines. Travis and Jenkins are good for small projects but they simply don't scale for large numbers of commits, platforms to test or complicated pipelines. We followed a similar path that led us to develop Taskcluster.
There were many more great talks, hopefully more slides will be up soon!
to provide a stable location for scripted downloads. There are similar links for betas and extended support releases for organisations. Read on to learn how these directories have changed, and how you can continue to download the latest releases.
Until recently these directories were implemented using a symlink to the current version, for example firefox/releases/42.0/. The storage backend has now changed to Amazon S3 and this is no longer possible. To implement the same functionality we’d need a duplicate set of keys, which incurs more maintenance overhead. And we already have a mechanism for delivering files independent of the current shipped version – our download redirector Bouncer. For example, here’s the latest release for Windows 32bit, U.S. English:
I was fortunate enough to be able to attend Dev Ops Days Silicon
Valley this year. One of the main talks was given by
Jason Hand, and he made some great points. I wanted to highlight two
of them in this post:
Post Mortems are really learning events, so you should hold them
when things go right, right? RIGHT!! (Seriously, why
wouldn’t you want to spot your best ideas and repeat them?)
Systems are hard – if you’re pushing the envelope, you’re
teetering on the line between complexity and chaos. And we’re
all pushing the envelope these days - either by getting fancy
or getting lean.
Post Mortems as Learning Events
Our industry has talked a lot about “Blameless Post Mortems”, and
techniques for holding them. Well, we can call them “blameless” all we
want, but if we only hold them when things go wrong, folks will get the
message loud and clear.
If they are truly blameless learning events, then you would also hold
them when things go right. And go meh. Radical idea? Not really - why
else would sports teams study game films when they win? (This point was
also made in a great Ignite by Katie Rose: GridIronOps - go read her
My $0.02 is - this would also give us a chance to celebrate success.
That is something we do not do enough, and we all know the dedication
and hard work it takes to not have things go sideways.
And, by the way, terminology matters during the learning event. The
person who is accountable for an operation is just that: capable of
giving an account of the operation. Accountability is not
Terminology and Systems – Setting the right expectations
Part way through Jason’s talk, he has this awesome slide about how
system complexity relates to monitoring which relates to problem
resolution. Go look at slide 19 - here’s some of what I find
amazing in that slide:
It is not a straight line with a destination. Your most stable
system can suddenly display inexplicable behavior due to any
number of environmental reasons. And you’re back in the chaotic
world with all that implies.
Systems can progress out of chaos, but that is an uphill battle.
Knowing which stage a system is in (roughly) informs the approach
to problem resolution.
Note the wording choices: “known” vs “unknowable” – for all but
the “obvious” case, it will be confusing. That is a property of
the system, not a matter of staff competency.
While not in his slide, Jason spoke to how each level really has
different expectations. Or should have, but often the appropriate
expectation is not set. Here’s how he related each level to industry
The only level with enough certainty to be able to expect the “best”
is the known and familiar one. This is the “obvious” one, because
we’ve all done exactly this before over a long enough time period to
fully characterize the system, its boundaries, and abnormal
Here, cause and effect are tightly linked. Automation (in real time)
Once we back away from such certainty, it is only realistic to have
less certainty in our responses. With the increased uncertainty, the
linkage of cause and effect is more tenuous.
Even if we have all the event history and logs in front of us, more
analysis is needed before appropriate corrective action can be
determined. Even with automation, there is a latency to the
Okay, now we are pushing the envelope. The system is complex, and
we are still learning. We may not have all the data at hand, and may
need to poke the system to see what parts are stuck.
Cause and effect should be related, but how will not be
visible until afterwards.
There is much to learn.
For chaotic systems, everything is new. A lot is truly unknowable
because that situation has never occurred before. Many parts of the
system are effectively black boxes. Thus resolution will often be a
process of trying something, waiting to see the results, and
responding to the new conditions.
There is so much more in that diagram I want to explore. The connecting
of problem resolution behavior to complexity level feels very powerful.
My experience tells me that many of these subjective terms are
highly context sensitive, and in no way absolute. Problem resolution
at 0300 local with a bad case of the flu just has a way of making
“obvious” systems appear quite complex or even chaotic.
By observing the behavior of someone trying to resolve a problem,
you may be able to get a sense of how that person views that system
at that time. If that isn’t the consensus view, then there is a gap.
And gaps can be bridged with training or documentation or
Today we started serving an important set of directories on ftp.mozilla.org using Amazon S3, more details on that over in the newsgroups. Some configuration changes landed in the tree to make that happen.
Please rebase your try pushes to use revision 0ee21e8d5ca6 or later, currently on mozilla-inbound. Otherwise your builds will fail to upload, which means they won’t run any tests. No fun for anyone.
The Duo application is nice if you have a supported mobile device, and it’s
usable even when you
you have no cell connection via TOTP. However, getting Viscosity to allow both
choices took some work for me.
For various reasons, I don’t want to always use the Duo application, so
would like for Viscosity to alway prompt for password. (I had already
saved a password - a fresh install likely would not have that issue.)
That took a bit of work, and some web searches.
Disable any saved passwords for Viscosity. On a Mac, this means
opening up “Keychain Access” application, searching for “Viscosity”
and deleting any associated entries.
Ask Viscosity to save the “user name” field (optional). I really
don’t need this, as my setup uses a certificate to identify me.
So it doesn’t matter what I type in the field. But, I like hints, so
I told Viscosity to save just the user name field:
With the above, you’ll be prompted every time. You have to put
“something” in the user name field, so I chose to put “push or TOTP” to
remind me of the valid values. You can put anything there, just do not check
the “Remember details in my Keychain” toggle.
In September, Mozilla release engineering started experiencing high pending counts on our test pools, notably Windows, but also Linux (and consequently Android). High pending counts mean that there are thousands of jobs queued to run on the machines that are busy running other jobs. The time developers have to wait for their test results is longer than ideal.
Usually, pending counts clear overnight as less code is pushed during the night (in North America) which invokes fewer builds and tests. However, as you can see from the graph above, the Windows test pending counts were flat last night. They did not clear up overnight. You will also note that try, which usually comprises 63% of our load, has very highest pending counts compared to other branches. This is because many people land on try before pushing to other branches, and tests aren't coalesced on try.
The work to determine the cause of high pending counts is always an interesting mystery.
Are end to end times for tests increasing?
Have more tests been enabled recently?
Are retries increasing? (Tests the run multiple times because the initial runs fail due to infrastructure issues)
Are jobs that are coalesced being backfilled and consuming capacity?
Are tests being chunked into smaller jobs that increase end to end time due to the added start up time?
Joel Maher and I looked at the data for this last week and discovered what we believe to be the source of the problem. We have determined that since the end of August a number of new test jobs were enabled that increased the compute time per push on Windows by 13% or 2.5 hours per push. Most of these new test jobs are for e10s.
Increase in seconds that new jobs added to the total compute time per push. (Some existing jobs also reduced their compute time for a total difference about about 2.5 more hours per push on Windows)
The e10s initiative is an important initiative for Mozilla to make Firefox performance and security even better. However, since new e10s and old tests will continue to run in parallel, we need to get creative on how to have acceptable wait times given the limitations of our current Windows tests pools. (All of our Windows test run on bare metal in our datacentre, not on Amazon).
Release engineering is working to reduce this pending counts given our current hardware constraints with the following initiatives:
To reduce Linux pending counts:
Added 200 new instances to the tst-emulator64 pool (run Android test jobs on Linux emulators) (bug 1204756)
In process of adding more Linux32 and Linux64 buildbot masters (bug 1205409) which will allow us to expand our capacity more
Ongoing work to reduce the Windows pending counts:
Disable Linux32 Talos tests and redeploy these machines as Windows test machines (bug 1204920 and bug 1208449)
Reduce the number of talos jobs by running SETA on talos (bug 1192994)
Developer productivity team is investigating whether non-operating specific tests that run on multiple windows test platforms can run on fewer platforms.
How can you help?
Please be considerate when invoking try pushes and only select the platforms that you explicitly require to test. Each try push for all platforms and all tests invokes over 800 jobs.
Password Store (aka “pass”) is a very handy wrapper for dealing
with pgp encrypted secrets. It greatly simplifies securely working with
multiple secrets. This is still true even if you happen to keep your
encrypted secrets in non-password-store managed repositories, although
that setup isn’t covered in the docs. I’ll show my setup here. (See the
Password Store page for usage: “pass show -c <spam>” & “pass
search <eggs>” are among my favorites.)
Note: this post has been sitting in the drafts queue for some reason.
Better to publish it. :)
As of Tuesday, Aug 4, 2015 Funsize has been enabled on mozilla-central.
From now on all Nightly builds builds
will get updates for builds up to 4 days in the past (for yesterday, for
the day before yesterday, etc). This should make people who don't run
their nightlies every day happier.
Firefox Developer Edition partial updates will be enabled after 42.0 hits
mozilla-aurora, but early adopters can use the aurora-funsize channel.
Partial updates as a part of builds and L10N repacks on nightly will be
disabled as soon as Bug 1173459 is resolved.
tl;dr: You might find this gist handy if you enable
Modern ssh comes with the option to obfuscate the hosts it can connect
to, by enabling the HashKnownHosts option. Modern server installs
have that as a default. This is a good thing.
The obfuscation occurs by hashing the first field of the known_hosts
file - this field contains the hostname,port and IP address used to
connect to a host. Presumably, there is a private ssh key on the host
used to make the connection, so this process makes it harder for an
attacker to utilize those private keys if the server is ever
Super! Nifty! Now how do I audit those files? Some services have
multiple IP addresses that serve a host, so some updates and changes are
legitimate. But which ones? It’s a one way hash, so you can’t decode.
Well, if you had an unhashed copy of the file, you could match host keys
and determine the host name & IP.  You might just have such a file on
your laptop (at least I don’t hash keys locally).  (Or build a
special file by connecting to the hosts you expect with the options “-oHashKnownHosts=no-oUserKnownHostsFile=/path/to/new_master”.)
I through together a quick python script to do the matching, and it’s at
this gist. I hope it’s useful - as I find bugs, I’ll keep it updated.
This xckd reminded me of the challenges of managing our buildfarm somedays :-)
I took three courses from Coursera's Data Science track from John Hopkins University. As with previous coursera classes I took, all the course material is online (lecture videos and notes). There are quizzes and assignments that are due each week. Each course below was about four weeks long.
The Data Scientist's Toolbox - This course was pretty easy. Basically a introduction to the questions that data scientists deal as well a primer on installing R, RStudio (IDE for R), and using GitHub. R Programming - Introduction to R. Most of the quizzes and examples used publicly available data for the programming exercises. I found I had to do a lot of reading in the R API docs or on stackoverflow to finish the assignments. The lectures didn't provide a lot of the material needed to complete the assignments. Lots of techniques to learn how to subset data using R which I found quite interesting, reminded me a lot of querying databases with SQL to conduct analysis. Getting and Cleaning Data - More advanced techniques using R. Using publicly available data sources to clean different data sources in different formats, XML, excel spreadsheets, comma or tab delimited. Given this data, we had to answer many questions and conduct specific analysis by writing R programs. The assignments were pretty challenging and took a long time. Again, the course material didn't really cover all the material you needed to do the assignments so a lot of additional reading was required.
There are six more courses in the Data Science track that I'll start tackling again in the fall that cover subjects such as reproducible research, statistical inference and machine learning. My next coursera class is Introduction to Systems Engineering which I'll start in a couple of weeks. I've really become interested in learning more about this subject after reading Thinking in Systems.
The other course I took this spring was the Software Carpentry Instructor training course. The Software Carpentry Foundation teachers researchers basic software skills. For instance, if you are a biologist analyzing large data sets it would be useful to learn how to use R, Python, and version control to store the code you wrote to share with others. These are not skills that many scientists acquire in their formal university training, and learning them allows them to work more productively. The instructor course was excellent, thanks Greg Wilson for your work teaching us.
We read two books for this course: Building a Better Teacher: An interesting overview of how teacher is taught in different countries and how to make it more effective. Most important: Have more opportunities for other teachers to observe your classroom and provide feedback which I found analogous to how code review makes us better software developers. How Learning Works: Seven Research-Based Principles for Smart Teaching: A book summarizing the research in disciplines such as education, cognitive science and psychology on the effective techniques for teaching students new material. How assessing student's prior knowledge can help you better design your lessons, how to to ask questions to determine what material students are failing to grasp, how to understand student's motivation for learning and more. Really interesting research.
For the instructor course, we met every couple of weeks online where Greg would conduct a short discussion on some of the topics on a conference call and we would discuss via etherpad interactively. We would then meet in smaller groups later in the week to conduct practice teaching exercises. We also submitted example lessons to the course repo on GitHub. The final project for the course was to conduct a short lesson to a group of instructors that gave feedback, and submit a pull request to update an existing lesson with a fix. Then we are ready to sign up to teach a Software Carpentry course!
In conclusion, data science is a great skill to have if you are managing large distributed systems. Also, using evidence based teaching methods to help others learn is the way to go!
Funsize is very close to be enabled in production! It has undergone a
Rapid Risk Assessment
procedure, which found a couple of potential issues. Most of them are
either resolved or waiting for deployment.
To make sure everything works as expected and to catch some last-minute
bugs, I added new update channels for Firefox Nightly and Developer
Edition. If you are brave enough, you can use the following
and change your update channels to either nightly-funsize (for Firefox
Nightly) or aurora-funsize (for Firefox Developer Edition).
TL;DR instruction look like this:
Enable update logging. Set app.update.log to true in about:config. This step is optional, but
it may help with debugging possible issues.
Shut down all running instances of Firefox.
Edit defaults/pref/channel-prefs.js in your Firefox installation
directory and change the line containing app.update.channel with:
In an earlier post, I wrote how we had reduced the amount of test jobs that run on two branches to allow us to scale our infrastructure more effectively. We run the tests that historically identify regressions more often. The ones that don't, we skip on every Nth push. We now have data on how this reduced the number of jobs we run since we began implementation in April.
We run SETA on two branches (mozilla-inbound and fx-team) and on 18 types of builds. Collectively, these two branches represent about 20% of pushes each month. Implementing SETA allowed us to move from ~400 -> ~240 jobs per push on these two branches1 We run the tests identified as not reporting regressions on every 10th commit or 90 minutes since the last test was scheduled. We run the critical tests on every commit.2
Reduction in number of jobs per push on mozilla-inbound as SETA scheduling is rolled out
A graph for the fx-team branch shows a similar trend. It was a staged rollout starting in early April, as I enabled platforms and as the SETA data became available. The dip in early June reflects where I enabled SETA for Android 4.3.
Running a large continuous integration farm forces you to deal with many dynamic inputs coupled with capacity constraints. The number of pushes increase. People add more tests. We build and test on a new platform. If the number of machines available remains static, the computing time associated with a single push will increase. You can scale this for platforms that you build and test in the cloud (for us - Linux and Android on emulators), but this costs more money. Adding hardware for other platforms such as Mac and Windows in data centres is also costly and time consuming.
Do we really need to run every test on every commit? If not, which tests should be run? How often do they need to be run in order to catch regressions in a timely manner (i.e. able to bisect where the regression occurred)
Several months ago, jmaher and vaibhav1994, wrote code to analyze the test data and determine the minimum number of tests required to run to identify regressions. They named their software SETA (search for extraneous test automation). They used historical data to determine the minimum set of tests that needed to be run to catch historical regressions. Previously, we coalesced tests on a number of platforms to mitigate too many jobs being queued for too few machines. However, this was not the best way to proceed because it reduced the number of times we ran all tests, not just less useful ones. SETA allows us to run a subset of tests on every commit that historically have caught regressions. We still run all the test suites, but at a specified interval.
In the last few weeks, I've implemented SETA scheduling in our our buildbot configs to use the data that the analysis that Vaibhav and Joel implemented. Currently, it's implemented on mozilla-inbound and fx-team branches which in aggregate represent around 19.6% (March 2015 data) of total pushes to the trees. The platforms configured to run fewer tests for both opt and debug are
MacOSX (10.6, 10.10)
Windows (XP, 7, 8)
Ubuntu 12.04 for linux32, linux64 and ASAN x64
Android 2.3 armv7 API 9
As we gather more SETA data for newer platforms, such as Android 4.3, we can implement SETA scheduling for it as well and reduce our test load. We continue to run the full suite of tests on all platforms other branches other than m-i and fx-team, such as mozilla-central, try, and the beta and release branches. If we did miss a regression by reducing the tests, it would appear on other branches mozilla-central. We will continue to update our configs to incorporate SETA data as it changes.
How does SETA scheduling work? We specify the tests that we would like to run on a reduced schedule in our buildbot configs. For instance, this specifies that we would like to run these debug tests on every 10th commit or if we reach a timeout of 5400 seconds between tests.
Previously, catlee had implemented a scheduling in buildbot that allowed us to coallesce jobs on a certain branch and platform using EveryNthScheduler. However, as it was originally implemented, it didn't allow us to specify tests to skip, such as mochitest-3 debug on MacOSX 10.10 on mozilla-inbound. It would only allow us to skip all the debug or opt tests for a certain platform and branch.
I modified misc.py to parse the configs and create a dictionary for each test specifying the interval at which the test should be skipped and the timeout interval. If the tests has these parameters specified, it should be scheduled using the EveryNthScheduler instead of the default scheduler.
Here's April 2015's monthly analysis of the pushes to our Mozilla development trees. You can load the data as an HTML page or as a json file.
Trends The number of pushes decreased from those recorded in the previous month with a total of 8894. This is due to the fact that gaia-try is managed by taskcluster and thus these jobs don't appear in the buildbot scheduling databases anymore which this report tracks.
296 pushes/day (average)
Highest number of pushes/day: 528 pushes on Apr 1, 2015
17.87 pushes/hour (highest average)
Try has around 58% of all the pushes now that we no longer track gaia-try
The three integration repositories (fx-team, mozilla-inbound and b2g-inbound) account around 28% of all the pushes.
August 2014 was the month with most pushes (13090 pushes)
August 2014 had the highest pushes/day average with 422 pushes/day
July 2014 had the highest average of "pushes-per-hour" with 23.51 pushes/hour
October 8, 2014 had the highest number of pushes in one day with 715 pushes
Note I've changed the graphs to only track 2015 data. Last month they were tracking 2014 data as well but it looked crowded so I updated them. Here's a graph showing the number of pushes over the last few years for comparison.
ftp.mozilla.org has been around for a long time in the world of Mozilla, dating back to original source release in 1998. Originally it was a single server, but it’s grown into a cluster storing more than 60TB of data, and serving more than a gigabit/s in traffic. Many projects store their files there, and there must be a wide range of ways that people use the cluster.
This quarter there is a project in the Cloud Services team to move ftp.mozilla.org (and related systems) to the cloud, which Release Engineering is helping with. It would be very helpful to know what functionality people are relying on, so please complete this survey to let us know. Thanks!
The nature of Funsize is that we may start hundreds of jobs at the same time,
then stop sending new jobs and wait for hours. In other words, the service is
very bursty. Elastic Beanstalk is not ideal for this use case. Scaling up
and down very fast is hard to configure using EB-only tools. Also, running zero
instances is not easy.
I tried using Terraform, Cloud Formation and Auto Scaling, but they were
also not well suited. There were too many constrains (e.g. Terraform doesn't
support all needed AWS features) and they required considerable bespoke
setup/maintenance to auto-scale properly.
The next option was Taskcluster, and I was pleased that its design fitted our
requirements very well! I was impressed by the simplicity and flexibility
I have implemented a service which consumes Pulse messages for particular
buildbot jobs. For nightly builds, it schedules a task graph with three
All tasks are run inside Docker containers which are published on the
docker.com registry (other registries can also be used). The task definition
essentially comprises of the docker image name and a list of commands it should
run (usually this is a single script inside a docker image). In the same task
definition you can specify what artifacts should be published by Taskcluster.
The artifacts can be public or private.
Things that I really liked
Predefined task IDs. This is a great idea! There is no need to
talk to the Taskcluster APIs to get the ID (or multiple IDs for task
graphs) nor need to parse the response. Fire and forget! The task IDs
can be used in different places, like artifact URLs, dependant tasks,
Task graphs. This is basically a collection of tasks that can be
run in parallel and can depend on each other. This is a nice way to
declare your jobs and know them in advance. If needed, the task graphs
can be extended by its tasks (decision tasks) dynamically.
Simplicity. All you need is to generate a valid JSON document and
submit it using HTTP API to Taskcluster.
User defined docker images. One of the downsides of Buildbot is that you have a predefined list of slaves
with predefined environment (OS, installed software, etc). Taskcluster
leverages Docker by default to let you use your own images.
Things that could be improved
Encrypted variables. I spent 2-3 days fighting with the encrypted
variables. My scheduler was written in Python, so I tried to use a
half dozen different Python PGP libraries, but for some reason all of
them were generating an incompatible OpenPGP format that Taskcluster
could not understand. This forced me to rewrite the scheduling part
in Node.js using openpgpjs. There is a bug to address
this problem globally. Also, using ISO time stamps would have
saved me hours of time. :)
It would be great to have a generic scheduler that doesn't require
third party Taskcluster consumers writing their own daemons watching
for changes (AMQP, VCS, etc) to generate tasks. This would lower the
entry barrier for beginners.
There are many other things that can be improved (and I believe they
will!) - Taskcluster is still a new project. Regardless of this, it is
very flexible, easy to use and develop. I would recommend using it!
We migrated most of our Mac OS X 10.8 (Mountain Lion) test machines to 10.10.2 (Yosemite) this quarter.
This project had two major constraints: 1) Use the existing hardware pool (~100 r5 mac minis) 2) Keep wait times sane1. (The machines are constantly running tests most of the day due to the distributed nature of the Mozilla community and this had to continue during the migration.)
So basically upgrade all the machines without letting people notice what you're doing!
Why didn't we just buy more minis and add them to the existing pool of test machines?
We run performance tests and thus need to have all the machines running the same hardware within a pool so performance comparisons are valid. If we buy new hardware, we need to replace the entire pool at once. Machines with different hardware specifications = useless performance test comparisons.
We tried to purchase some used machines with the same hardware specs as our existing machines. However, we couldn't find a source for them. As Apple stops production of old mini hardware each time they announce a new one, they are difficult and expensive to source.
Given that Yosemite was released last October, why we are only upgrading our test pool now? We wait until the population of users running a new platform2 surpass those the old one before switching.
Mountain Lion -> Yosemite is an easy upgrade on your laptop. It's not as simple when you're updating production machines that run tests at scale.
The first step was to pull a few machines out of production and verify the Puppet configuration was working. In Puppet, you can specify commands to only run certain operating system versions. So we implemented several commands to accommodate changes for Yosemite. For instance, changing the default scrollbar behaviour, new services that interfere with test runs needed to be disabled, debug tests required new Apple security permissions configured etc.
Once the Puppet configuration was stable, I updated our configs so the people could run tests on Try and allocated a few machines to this pool. We opened bugs for tests that failed on Yosemite but passed on other platforms. This was a very iterative process. Run tests on try. Look at failures, file bugs, fix test manifests. Once we had to the opt (functional) tests in a green state on try, we could start the migration.
Disable selected Mountain Lion machines from the production pool
Reimage as Yosemite, update DNS and let them puppetize
Reconfig so the buildbot master enable new Yosemite builders and schedule jobs appropriately
Repeat this process in batches
Enable Yosemite opt and performance tests on trunk (gecko >= 39) (50 machines)
Enable Yosemite debug (25 more machines)
Enable Yosemite on mozilla-aurora (15 more machines)
We currently have 14 machines left on Mountain Lion for mozilla-beta and mozilla-release branches.
As a I mentioned earlier, the two constraints with this project were to use the existing hardware pool that constantly runs tests in production and keep the existing wait times sane. We encountered two major problems that impeded that goal:
Persistent and increasing numbers of DNS failures as we migrated more machines to Yosemite. The default Yosemite configuration broadcasts multicast messages via Bonjour. This is fine for a few Apple devices talking to each other in your house. This doesn't scale for 100 machines in a colo. I saw many DNS timeout messages in the system log. This manifested itself large numbers of performance tests failing because they couldn't resolve the name of the graphing server to upload their results. We disabled this multicast broadcast via Puppet and our tests turned green again.
It's a compliment when people say things like "I didn't realize that you updated a platform" because it means the upgrade did not cause large scale fires for all to see. So it was a nice to hear that from one of my colleagues this week.
Thanks to philor, RyanVM and jmaher for opening bugs with respect to failing tests and greening them up. Thanks to coop for many code reviews. Thanks dividehex for reimaging all the machines in batches and to arr for her valiant attempts to source new-to-us minis!
References 1Wait times represent the time from when a job is added to the scheduler database until it actually starts running. We usually try to keep this to under 15 minutes but this really varies on how many machines we have in the pool. 2We run tests for our products on a matrix of operating systems and operating system versions. The terminology for operating system x version in many release engineering shops is a platform. To add to this, the list of platform we support varies across branches. For instance, if we're going to deprecate a platform, we'll let this change ride the trains to release.
The Apple EULA severely restricts virtualization on Mac hardware.
I don't know of any major cloud vendors that offer the Mac as a platform. Those that claim they do are actually renting racks of Macs on a dedicated per host basis. This does not have the inherent scaling and associated cost saving of cloud computing. In addition, the APIs to manage the machines at scale aren't there.
We manage ~350 Mac minis. We have more experience scaling Apple hardware than many vendors. Not many places run CI at Mozilla scale :-) Hopefully this will change and we'll be able to scale testing on Mac products like we do for Android and Linux in a cloud.
Here's February's 2015 monthly analysis of the pushes to our Mozilla development trees. You can load the data as an HTML page or as a json file.
Trends Although February is a shorter month, the number of pushes were close to those recorded in the previous month. We had a higher average number of daily pushes (358) than in January (348).
Highlights 10015 pushes 358 pushes/day (average) Highest number of pushes/day: 574 pushes on Feb 25, 2015 23.18 pushes/hour (highest)
General Remarks Try had around 46% of all the pushes The three integration repositories (fx-team, mozilla-inbound and b2g-inbound) account around 22% of all the pushes
Records August 2014 was the month with most pushes (13090 pushes) August 2014 has the highest pushes/day average with 422 pushes/day July 2014 has the highest average of "pushes-per-hour" with 23.51 pushes/hour October 8, 2014 had the highest number of pushes in one day with 715 pushes
Tonight I attended the San Francisco Dev Ops meetup at Vungle. The
topic was one we often discuss at Mozilla - how to simplify a
developer’s life. In this case, the solution they have migrated to is
one based on Docker, although I guess the title already gave that away.
Long (but interesting - I’ll update with a link to the video when it
becomes available) story short, they are having much more success using
DevOps managed Docker containers for development than their previous setup of
Virtualbox images built & maintained with Vagrant and Chef.
I'm interviewed in the roundtable article on the future of release engineering, along with Chuck Rossi of Facebook and Boris Debic of Google. Interesting discussions on the current state of release engineering at organizations that scale large number of builds and tests, and release frequently. As well, the challenges with mobile releases versus web deployments are discussed. And finally, a discussion of how to find good release engineers, and what the future may hold.
Thanks to the other guest editors on this issue - Stephany Bellomo, Tamara Marshall-Klein, Bram Adams, Foutse Khomh and Christian Bird - for all their hard work that make this happen!
As an aside, when I opened the issue, the image on the front cover made me laugh. It's reminiscent of the cover on a mid-century science fiction anthology. I showed Mr. Releng and he said "Robot birds? That is EXACTLY how I pictured working in releng." Maybe it's meant to represent that we let software fly free. In any case, I must go back to tending the flock of robotic avian overlords.
FileMerge is a nice diff and merge tool for OS X, and I use it a lot for larger code reviews where lots of context is helpful. It also supports intra-line diff, which comes in pretty handy.
However in recent releases, at least in v2.8 which comes as part of XCode 6.1, it assumes you want to be merging and shows that bottom pane. Adjusting it away doesn’t persist to the next time you use it, *gnash gnash gnash*.
The solution is to open a terminal and offer this incantation:
defaults write com.apple.FileMerge MergeHeight 0
Unfortunately, if you use the merge pane then you’ll have to do that again. Dear Apple, pls fix!
The idea of using a service which can generate partial updates for
Firefox has been around for years. We actually used to have a server
called Prometheus that was responsible for generating updates
for nightly builds and the generation was done as a separate process
from actual builds.
Scaling that solution wasn't easy and we switched to build-time update
generation. Generating updates as a part of builds helped with load
distribution, but lacked of flexibility: there is no easy way to
generate updates after the build, because the update generation process
is directly tied to the build or repack process.
solve the problems listed above: to distribute load and to be flexible.
Last year Anhad started
and Mihai continued working
on this project. They have done a great job and created a solution that
can easily be scaled.
Funsize is split into several pieces:
REST API fronted powered by Flask. It's
responsible for accepting partial generation requests, forwarding them to
the queue and returning generated partials.
Celery-based workers to generate
partial updates and upload them to S3.
SQS or RabbitMQ to coordinate Celery workers.
One of the biggest gains of Funsize is that it uses a global cache to
speed up partial generation. For example, after we build an en-US
Windows build, we ask Funsize to generate a partial. Then a swarm of
L10N repacks (almost a hundred of them per platform) tries to do a
similar job. Every single one asks for a partial update. All L10N builds
have something in common, and xul.dll is one of the biggest files.
Since the files are identical there is no reason to not reuse the
previously generated binary patch for that file. Repeat 100 times for
multiple files. PROFIT!
The first prototype of Funsize lives at github. If you are interested in
hacking, read the docs on how
to set up your developer environment. If you don't have an AWS account,
it will use a local cache.
Note: this prototype may be redesigned and switch to using
TaskCluster. Taskcluster is going to
simplify the initial design and reduce dependency on always online
Here's January 2015's monthly analysis of the pushes to our Mozilla development trees. You can load the data as an HTML page or as a json file.
Trends We're back to regular volume after the holidays. Also, it's really cold outside in some parts of the of the Mozilla world. Maybe committing code > going outside.
Highlights 10798 pushes 348 pushes/day (average) Highest number of pushes/day: 562 pushes on Jan 28, 2015 18.65 pushes/hour (highest)
General Remarks Try had around around 42% of all the pushes The three integration repositories (fx-team, mozilla-inbound and b2g-inbound) account around 24% of all of the pushes
Records August 2014 was the month with most pushes (13,090 pushes) August 2014 has the highest pushes/day average with 422 pushes/day July 2014 has the highest average of "pushes-per-hour" with 23.51 pushes/hour October 8, 2014 had the highest number of pushes in one day with 715 pushes
On Jan 29, I treated myself to a seminar on Successful Lean Teams,
with an emphasis on Kanban & Kaizen techniques.
I’d read about both, but found the presentation useful. Many
of the other attendees were from the Health Care industry and their
perspectives were very enlightening!
Hearing how successful they were in such a high risk,
multi-disciplinary, bureaucratic, and highly regulated environment is inspiring. I’m
inclined to believe that it would also be achievable in a
simple-by-comparison low risk environment of software development. ;)
What these hospitals are using is a light weight, self managed process
ensures visibility of changes to all impacted folks
outlines the expected benefits
includes a “trial” to ensure the change has the desired impact
has a built in feedback system
That sounds achievable. In several of the settings, the traditional
paper and bulletin board approach was used, with 4 columns labeled “New
Ideas”, “To Do”, “Doing”, and “Done”. (Not a true Kanban board for
several reasons, but Trello would be a reasonable visual approximation;
CAB uses spreadsheets.)
Cards move left to right, and could cycle back to “New Ideas” if
iteration is needed. “New Ideas” is where things start, and they
transition from there (I paraphrase a lot in the following):
Everyone can mark up cards in New Ideas & add alternatives, etc.
A standup is held to select cards to move from “New Ideas” to “To Do”
The card stays in “To Do” for a while to allow concerns to be
expressed by other stake holders. Also a team needs to sign up to
move the change through the remaining steps. Before the card can move
to “Doing”, a “test” (pilot or checkpoints) is agreed on to ensure the
change can be evaluated for success.
The team moves the card into “Doing”, and performs PSDA cycles (Plan, Do,
Study, Adjust) as needed.
Assuming the change yields the projected results, the change is
implemented and the card is moved to “Done”. If the results aren’t as
anticipated, the card gets annotated with the lessons learned, and
either goes to “Done” (abandon) or back to “New Ideas” (try again) as
For me, I’m drawn to the 2nd and 3rd steps. That seems to be the change
from current practice in teams I work on. We already have a gazillion bugs
filed (1st step). We also can test changes in staging (4th step) and
update production (5th step). Well, okay, sometimes we skip the staging
run. Occasionally that *really* bites us. (Foot guns, foot guns –
get your foot guns here!)
The 2nd and 3rd steps help focus on changes. And make the set of changes
happening “nowish” more visible. Other stakeholders then have a small
set of items to comment upon. Net result - more changes “stick” with
less overall friction.
Painting with a broad brush, this Kaizen approach is essentially what
the CAB process is that Mozilla IT implemented successfully. I have
experienced the CAB reduce the amount of stress, surprises, and self
inflicted damage amongst both inside and outside of IT. Over time, the
velocity of changes has increased and backlogs have been reduced. In
short, it is a “Good Thing(tm)”.
So, I’m going to see if there is a way to “right size” this process for
the smaller teams I’m on now. Stay tuned....