Speakers: Chirayu Krishnappa & Daniel Liem (Uber), Christian Legnitto (Pocketship), Jacek Suliga (LinkedIn), Robbert Van Ginkel & Gautam Korlam (Uber), Rachel Brindle (Pivotal Labs)
Tools for building and releasing mobile applications provided by Google and Apple are geared towards smaller mobile application development teams. However, once development teams start to grow, the requirement from your build and release tooling change drastically. This meetup was all about building & releasing mobile applications at scale: How does your build infrastructure need to evolve to support increasingly complex code-bases? How can you build an automated release pipeline that tracks every build and rolls out your mobile applications safely? What kind of unexpected problems can arise from adopting new technologies when you have a larger team?
6. ● Have a dedicated Release team
● Aggressive weekly release cadence
● Build cuts (CI) from Master
● Nightly (alpha) vs. Beta / Production builds
● Internal beta dogfooding vs. External Beta testing
● FF (Feature Flagging) wherever possible
● Avoid alphafixes, betafixes, hotfixes & rollbacks
● Soft Upgrades vs. Force Upgrades
Our Process
58. Building At Uber Scale
Like a ‘BAUS’
Robbert van Ginkel & Gautam Korlam
11.1.2016
59. Overview
Challenges with mobile development at scale
Team Size
Build Time
Infrastructure
Improving Developer Experience while tackling scale
Architecture
Workflow
64. Architecting for Scale
Code architecture
Features are built as Plugins and shared between apps
Code infrastructure and tooling
Monorepo helps with modularization and sharing
Regressions block the whole team
Always keep master green
Guard as much as possible at compile time
Fail fast
65. Workflow at Scale
Asynchronous change merging
Submit queue
Stacked Diffs
Run expensive code quality checks pre merge
UI Tests
Deep static analysis - Infer etc.
Performance regressions on real devices - cold start, battery, network etc.
69. Build Tools Scaling Issues
Cocoapods
Does not scale well with more targets (15 min pod install time)
Xcode
Incorrect incremental builds (non deterministic and hard to debug)
Xcode project file merge conflicts
Gradle
Does not scale well with large android projects (15 min for a single line change)
Android Studio performance degrades
70. Building at Scale
Both iOS and Android use Buck to build at Uber
Incremental everywhere
Scale non exponentially as more code is added
Cache immutable state - avoid rebuilding
Transparent Dependency Management
Works well for monorepo
iOS - Clean ~4x faster, Incremental ~20x faster
Android - Clean ~6x faster, Incremental ~30x faster
Remote Build Cache
72. Uber’s CI Infrastructure
CI capacity needs increased exponentially
400+ Busy Executors on CI hourly
50k+ CI Jobs run per day
600
400
200
100
CI Executors with Time
73. Optimizing the CI Pipeline
Perform relevant checks at the right stage
Code Formatting - pre diff
Build, Unit Tests - diff
UI, Static Analysis - pre merge
Use CI resources effectively
Remote build artifact caching
Build in elasticity to meet peak demand
75. Projects to Watch
OkBuck - Gradle plugin that lets you use gradle projects with buck
Buck Http Cache - A distributed build artifact cache service
Coming soon: Swift Support in Buck
https://github.com/uber/buck-http-cache
1https://github.com/uber/okbuck , Slide Deck
76. Takeaway
Invest in the right build tools early on
Scaling hardware only works till a certain point
Having shared workflow/tools across platforms helps a lot in the long run
Fail earlier and keep master always green
77. Scaling the Build Process at Uber
Robbert van Ginkel & Gautam Korlam
Thank You
169. TERMS
• User: Someone who uses your app.
• Environment: Place where a user can download
your app
• Staging: HockeyApp, Testflight, etc.
• Production: Enterprise MDM, App Store, Play
Store
• Automated Deployment: Using CI to push to
environment
z
171. WHY
• Frees up the deployer
to do other things
• Consistent deploys
• Shorter release cycle
• Documents
$ git push
pushed g4edeff4
$ # wait
$ rake check_if_deployed
Latest is g4edeff4
z
172. • Make sure tests pass
• Build for release
• Gather metadata
• Screenshots
• Release Notes
• Other?
• Upload to environment
173. • Make sure tests pass
• Build for release
• Gather metadata
• Screenshots
• Release Notes
• Other?
• Upload to environment