In 2005, Etsy started to connect all corners of the globe with creators selling handcrafted goods and vintage treasures online. Today, more than 60 million people are shopping 72 million items from 3.1 million sellers—including every category of crafter, artist, and treasure hunter. Supporting the world’s most vibrant maker community is Etsy’s engineering team, whose code-as-craft approach brings the care and artistry of their users to every line of their software.
Etsy has always hosted their code on GitHub, using a GitHub Enterprise Server installation they managed themselves. But in 2018, their strategy changed: the organization decided to step away from maintaining infrastructure in favor of focusing their efforts on building the best customer experience possible. This meant not only moving their infrastructure to the cloud, but also their developer tools. Their move to Google Cloud kicked off a deeper paradigm shift from infrastructure self-reliance to best-in-class service providers. “We wanted to direct our engineering efforts to everything core to Etsy, and leverage the expertise of third-party partnerships for service,” said Senior Engineering Manager Modesto Hernandez.
Driven by this larger trend in the organization, engineers started migrating repositories from GitHub Enterprise Server to Enterprise Cloud with the help of GitHub Professional Services. Ultimately, this move allowed the team to open up their infrastructure to integrations and spend less time managing hardware—and more time focusing on what makes Etsy special.
The Etsy mobile repository now lives in the cloud on GitHub, while 75 percent of Etsy’s code base is still in the self-hosted GitHub Enterprise in Google Cloud. Senior iOS Engineer Mike Simons joined Etsy during the home stretch of the two-year migration. “The driving philosophy was to build our system so engineers can use the tools and languages they’re familiar with,” he said. “For example, they can modify the information that shows up in pull requests, and define the parameters for when a test passes or fails.”
For instance, Swift engineers can now build custom plugins and more for Fastlane—an open source automation tool for iOS and Android deployment—and contribute to the CI system, even if they aren’t comfortable in Ruby. Fastlane hooks call their Swift scripts, doing the bulk of processing from Junit reports to GitHub annotations. Conveniently, configurations like this all live in repositories. So any changes to the checks happen within pull requests and pass CI before they’re merged. “We no longer have to save it on Jenkins and hope it works,” said Simons. This not only protects against unwanted changes, it increases flexibility: Engineers can introduce new checks or tweak current ones without disrupting the team, leading to faster development cycles.
Everything that’s needed to run in CI now lives in a repository, making the process less of a magic box. “Everything that runs tests are either Fastlane lanes or Gradle tasks,” explained Simons. “Engineers can run it all locally, so the difference between CI and local development is much smaller.” And as a result, their system is less brittle and it’s much easier to debug when things go wrong.
Etsy’s coordination hub is a Google App Engine app tied together by the GitHub API and lovingly named Farnsworth “because it’s always delivering good news.” With Farnsworth, automated CI/CD supports incremental change and experimentation—all while helping engineers spot problems in development before they reach users. For example, checks run using GitHub and Bitrise, a mobile CI/CD service, are automated to smooth out the process of testing code and reviewing status messages. “Farnsworth even runs CI checks on itself for things like TypeScript linting and compilation whenever we send it a pull request.”
Over the last few years, Etsy has shifted their toolset to focus on managing a few things well and automating the rest. “GitHub streamlined everything,” explained Simons. “There are fewer moving parts, all centralized on GitHub.”
GitHub streamlined everything. There are fewer moving parts, all centralized on GitHub.
Etsy deploys to production more than 50 times a day and uses Slack to coordinate trains between developers that need to push changes. “The engineering organization uses Slack to review code and communicate with everyone else, so integrating GitHub is a big win,” said Hernandez. Engineers receive pull requests, reviews, and notifications in Slack.
Despite using fewer tools, the team accomplishes more. With engineers moving to the cloud, they’ve been able to ship more code and respond faster to user needs. “By moving off our own servers to GitHub Enterprise Cloud we’ve been able to simplify our process,” said Simons, “and cut down the amount of Etsy engineering time spent between getting a release ready and getting into the Apple and Google Play Stores.” And if there’s a crash or bug, the team can respond with an app store-ready update much faster.
Speed is a plus, but it’s not everything: Reinforcing their development cycle with automation has helped engineers enforce best practices and write more consistent code. “Before the migration, folks could get fast and loose about code reviews,” Simons said. “Now we have up to 10 separate checks that run on every commit that’s pushed.” These are powered, in part, by the GitHub Events API and belong to a system that supports Android repositories, iOS repositories, and, in theory, every other technology stack.
For Simons, the biggest win here is information: Teams can make sure checks are devised to result in actionable next steps without a lot of context switching. “All the information we need is right in the pull request and shortens our engineers’ iteration time,” Simons said. “Instead of having to dig into the CI logs, it’s all right there.”
Automation has also helped engineers work more effectively with other teams on everything from SOX compliance to QAing new features. For instance, pull requests can trigger ad hoc builds that can be installed in devices. These provide product managers, designers, and QA staff with earlier visibility, and help everyone work through issues faster. “We’re able to deploy features more quickly and shorten the iteration cycle between developers writing code and everyone else reviewing the functionality of the feature,” Simons said.
Maintaining visibility and insight into other teams’ projects isn’t just practical—for Chief Architect Keyur Govande, it’s also essential to the creative health of their engineers. “In the nine-and-a-half years I’ve been here, we’ve practiced innersource and used GitHub as a discoverability tool.” There are very few constraints on what engineers have access to at Etsy. Setting all repositories to internal is an easy way to remove overhead, and it also helps engineers, data scientists, security teams and more learn from each other.
“Everyone should be able to read the code that powers etsy.com and contribute to the broader success of the company.” Govande also feels that learning opportunities help with retention. “We understand people want new challenges. With GitHub, we can do that within Etsy and retain our talent.” For new hires, using open source tools increases Etsy’s credibility and decreases onboarding time. “Most startups and technology companies are built on open source tooling,” Govande explained. “It’s a no-brainer: Why start from scratch when you can iterate on existing projects?”
It’s not just engineers who are drawn to GitHub. “Developers, product managers, designers, and finance colleagues are starting to rely on GitHub, not just for information, but to enable collaboration,” said Hernandez. “It’s the central location where code rules, and it drives meaningful interactions. Because if a conversation is not impacting a feature or bug fix, why are we having it?”
At a company that prides itself on unique craftsmanship, Etsy engineers are no exception, approaching each line of code with the same care and attention to detail as any of its 3.1 million makers—and leveraging GitHub to both streamline processes and facilitate faster innovation for the modern online marketplace.