[SERVER-83125] ninja calls bazel unnecessarily sometimes Created: 10/Nov/23  Updated: 02/Feb/24

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Daniel Moody Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Participants:

 Description   

In SERVER-82638, we added some integration glue which implements ninja being able to call bazel to build certain targets. This implementation has a deficiency where all possible bazel targets are defined as outputs from the bazel build, but we do not want bazel to always build all the outputs. Unfortunately ninja will always consider a node dirty if any of the outputs is missing.

Bazel makes its own decisions about building things when called and so if it unnecessary called, it does not cause any issues, however it does slow down noop builds by a few seconds which is the overhead of starting up bazel and bazel determining there is nothing to do.

This ticket is to investigate/implement better ways to do this, however, because the integration glue is temporary, this ticket may not be valuable, but it will exist to document the deficiency.


Generated at Thu Feb 08 06:51:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.