SlackBuild better software to build software better
Read Full ArticleSummary
The article explores the challenges faced in optimizing build performance for Quip and Slack Canvas, specifically addressing the lengthy build times that hindered development agility. By leveraging Bazel, a modern build tool, the authors detail how they restructured their build pipeline to utilize caching and parallelization effectively. The discussion emphasizes the importance of defining clear dependencies and ensuring that build units are hermetic and idempotent to maximize cache hit rates and minimize unnecessary work. The transition involved significant engineering efforts to separate concerns between backend and frontend code, ultimately leading to a more efficient and manageable build process.
Key Learnings
- 1Utilizing Bazel requires a well-defined dependency graph to leverage its caching and parallelization capabilities effectively.
- 2Caching can significantly improve build performance, but it necessitates careful consideration of function attributes like hermeticity and idempotency.
- 3Parallelization of build tasks can enhance speed, but the granularity of tasks must be optimized to balance between task size and count.
- 4Separation of concerns between application code and build orchestration is crucial to prevent unintended coupling that can degrade build performance.
- 5Testing and validating new build processes against existing outputs can ensure correctness and build confidence in the new system.
Who Should Read This
Senior Build Engineers implementing Bazel for complex software projects facing lengthy build times
Test Your Knowledge
What are the key characteristics that make a build unit suitable for caching in Bazel?
How does the granularity of tasks impact the effectiveness of parallelization in a build system?
What specific engineering challenges did the team face when transitioning to Bazel, and how were they resolved?
Why is it essential to maintain a hermetic and idempotent build process when using Bazel?
In what ways did the coupling between backend and frontend code affect build performance, and how was this addressed?
Topics
More articles about Bazel
Explore Bazel engineering →More from Slack Engineering
View Slack engineering blogs →Android VPAT journey
The article outlines Slack's journey in improving accessibility for its Android application through a Voluntary Product Accessibility Template (VPAT). It details the identification of accessibility...
Streamlining Security Investigations with Agents
The article outlines how Slack's Security Engineering team leverages AI agents to enhance the efficiency of security investigations. It details the development of a prototype that evolved into a...
Migration Automation: Easing the Jenkins → GHA shift with help from AI
The article outlines a project undertaken at Slack to automate the migration of CI jobs from Jenkins to GitHub Actions (GHA). It details the development of a conversion tool that leverages the GitHub...
Automated Accessibility Testing at Slack
The article outlines Slack's approach to enhancing accessibility through automated testing, emphasizing the importance of integrating accessibility checks within the existing testing frameworks. It...
How we built enterprise search to be secure and private
The article discusses the development of Slack's enterprise search feature, emphasizing its security and privacy principles that align with Slack AI's compliance standards. It details how the system...