execution caching Parsimony (endgame) Reproducibility java_library( name = "lib", src = ["Foo.java", "Bar.java"] deps = ["//db:client"], ) • Construct a Merkle (hash) tree from inputs • Build in a sandbox* of only the defined inputs • Name artifact after the hash
execution caching Parsimony (endgame) Parallel execution • Targets can be built in parallel • Extra tricks - compile ABI first • Remote execution Example:
execution caching Parsimony (endgame) Parsimony parsimony (n.) early 15c., from Latin parsimonia "sparingness, frugality, thrift," from pars-, past participle stem of parcere "to spare, save, refrain from, use moderately" (which is said to be unrelated to Latin parvus "small," parum "too little") + -monia, suffix signifying action, state, or condition. A.k.a.: Only build what is necessary Option A: Hit the cache Option B: Query the graph
created, updated or removed • Bazel Prep: • With the list of files, query for packages ◦ `bazel query “path/to/file”` • With the list of packages, query for targets of interest ◦ `bazel query ‘kind(docker_push_rule, allpaths(//…, packages))’` Serving: • Warm, with a pinch of CI