8/23/2022 · Joshua Cannon
What this post added
This post describes a staged migration of a Python monorepo from Bazel to Pants. It details the background of the monorepo's issues (slow CI, complex metadata), the evaluation and selection of Pants based on dependency inference and changed file detection, and the phased migration strategy. Specific technical details include seeding Pants metadata from Bazel, using Pants macros, validating Bazel metadata against Pants' inferred dependencies to uncover missing declarations, leveraging Pants' `--changed` flag for faster test runs, migrating `py_binary` rules, and optimizing Docker images by shedding shared base images. The post quantifies the reduction in build metadata and CI execution time.