ChromeOS Platform has a lot of code. Sometimes, we want to change code that has been used for years and is referenced from thousands of places throughout the codebase. These sorts of changes are referred to as LSCs (Large Scale Changes) and generally require complex planning.
This page and the referenced docs describe the policies and best practices that go into the planning, creating, and executing changes that impact many distinct packages.
Fixing old mistakes, crufty interfaces, and bad usage requires making many small changes across the codebase. Individually, these changes are tiny, but taken all together, they allow us to deprecate old interfaces and pay down our technical debt. The simpler we can make the code base, the more that developers can focus on their actual problems, instead of coping with artificial complexity because of accumulated cruft.
Although there are many ways that these changes can be handled, most will be handled by an ChromeOS LSC reviewer and a domain reviewer.
Given the cost of large scale changes (review cost often being a significant factor), we want to prioritize changes that have high value.
For example, while cosmetic changes have some positive value, we want reviewers to spend their time on higher value changes. This means that changes which are primarily cosmetic are rarely worth doing unless they interact with other automation, such as fixing a spelling mistake that then makes other refactorings work more consistently. If in doubt, send your proposal to chromeos-lsc-review before spending too much time on it.
Anyone making “large” changes. (Currently this is roughly defined as changes covering more than 10 distinct directories with OWNERS files.) We are aiming to enable a process where the processes and practices for making sweeping changes are more broadly accessible, enabling teams to more readily change the APIs they export while keeping a bound on how much time is spent coping with codebase churn.
At the highest level, we want to make sure anything going out in tens/hundreds/thousands of CLs is moving the codebase in the right direction and that it‘s worth the work it takes to get such changes tested, reviewed, and submitted. ChromeOS LSC Review will rarely say "This isn’t impactful enough", although it may happen (especially in cases where there is little or no distinct benefit). The more common role of the review is to ensure that the necessary documentation is in place: you will be sending CLs that are seen by dozens or hundreds of engineers who may not have any knowledge about your change. Some CL description updates and documentation can go a long way to making the process smooth.
In ChromeOS, we will grant the LSC Requestor the Gerrit Global Owners Approver power for the duration of their change, i.e. a member of ChromeOS LSC Review will approve the LSC Proposal which when then gives the LSC Requester the ability to bypass OWNERS in the interest of efficiency. (For external contributors, a Googler sponsor will act as the Global Owners Approver power holder. If you’re an external contributor, everything else is the same.) Each CL will still need a second human to review it to satisfy “two sets of eyes” code review policy requirements. This reduces the code-review burden on the rest of Chrome reviewers and increases the rate at which your change gets submitted. However, this also means that these kinds of LSCs have a high bar of being low-risk and non-controversial.
As the LSC Requestor, the process of getting the LSC fully submitted looks like:
After the LSC is fully submitted, the LSC Requestor will lose their Global Owners Approver power.
If global owners approval does not seem appropriate, we will ask you to send your changes for local approval by owners of the individual directories you're changing.
To build ChromeOS, we have many other repos which are included via the Repo manifest. Most of these are under the ownership of the Chrome org and this process (and have identical policies). But, some are not. For those that are under Chrome, this policy applies to all repos. Partners' proprietary repos are not yet included in this process.
As a LSC Requestor, you can split your CLs across these boundaries.
This depends on how large your change is—specifically, how many child CLs your large refactoring will split it into—and whether all sub-CLs affect the same OWNERS.
|Number of child CLs||Action|
|>= 30||Follow the ChromeOS LSC Workflow (i.e. create an LSC doc, get domain approval, email lsc-review@, wait for approval).|
|< 29||No requirements|
If you would like to request global owners approval for safe or trivial changes of any size, please also follow this process and wait for the LSC committee to respond to your document.
If all sub-CLs affect the same OWNERS, you do not need to follow the LSC process and instead can talk to an area owner for how to proceed with your change.
Follow the steps at ChromeOS LSC Workflow.
You should expect an initial response from a cleanup approver within two business days.
ChromeOS LSC Reviewers may fast-track low-risk changes, with a response estimated between a few hours to one business day. If you‘d like to request fast tracking, email chromeos-lsc-review with a link to the doc that you created at the end of ChromeOS LSC Workflow and we’ll get to it as quickly as we can.
Changes that operate broadly across the codebase affect many engineers and teams and these changes may generate discussion on the change or the best way to roll it out. This process is in place to make sure that these changes are useful, well-communicated, and to minimize the risk of having to attempt difficult rollbacks.
Definitely email the firstname.lastname@example.org list. We should be able to give you at least a vague idea of whether your idea has merit and who to approach as a domain expert to move ahead.
These changes are likely to be rare. If it does occur, please obey the normal rules for third_party changes. Be aware that some parts of third_party have an external codebase as their source-of-truth, and so are mechanically generated (e.g. by Copybara [external, internal, Googlers only]). This means that your changes will be overwritten by the next import.
Get your CLs submitted. For changes at this scale, it's usually best to use Suggest Owners and Auto-Submit. If anything surprising comes up during this process, or you need to ask questions to someone familiar with the process, try your assigned committee reviewer (see your LSC document). As with any wide-scale change, you should also consider announcing it on a mailing list that covers the target audience.
Contact your LSC-Review reviewer: they should have granted you (or your Googler sponsor) Global Approver power. The techniques for getting these submitted via global owner approval vary based on what is being changed, your approver will know what's what for your particular LSC. As with any wide-scale change, you should also consider announcing it on a mailing list. Any coworker or contributor can be your second-set of eyes to mass Code-Review +1 all of your CLs.
No. You can use a single LSC document to describe your entire series of changes even if you are asking for a mix of local and global approvals. Be sure to break each change out into an easily identifiable step in the document.
Backsliding (others submitting changes which reverse the intended change) is something which cannot be completely avoided in all cases. A useful technique to reduce them is to use Tricium (see go/luci/tricium [internal, Googlers only] for details) or Presubmit.
Your domain reviewer should be someone with the expertise and authority to approve the technical direction of the change you‘re proposing. For example, if you’re proposing migrating all users from library A to library B, your domain reviewer might be an OWNER of library A who can confirm the direction of your proposed LSC. This can also be someone from your team, if they're a domain expert. The idea is to get permission from anyone who could say “No, please roll back all these migration CLs.”
You’ve been selected as a relevant owner/expert for a large-scale change. We need your input as to whether or not the change is a good idea. You don’t need to review in detail (like a code review), but we want to make sure the relevant parties are convinced that the change is good. What we don’t want is to have to roll back after getting part way through a change involving hundreds of CLs.
That is exactly why you’re being asked: if you don’t like the change, we want to stop it before it gets split up and submitted.
Absolutely bring them into the discussion. The goal is to make sure that no LSC-approved change will have to be rolled back because of a lack of information or planning. We want to bring any and all relevant experts and stakeholders into the discussion early to minimize the risks.
Because these tiny cleanup CLs may differ from your normal reviews, you can likely look at them in the context of the entire change process and its approval.
You can say no, but must have a good reason. These changes generally involve mass refactoring - if you refuse the change, you may block the payoff of that refactoring for all of ChromeOS. Be prepared to justify your objections. If your objections to a CL amounts to wanting to do it differently, consider whether it‘s really worth objecting to - there is value in simply getting things done, and at our scale, it’s not always possible to find a solution that is optimal for everyone.
That said, as with any CL, the author should be able to provide justification for it, and part of the purpose of LSC policy is to ensure that justification exists and is sufficient. You can ask the author about the change, but first read the description and CL email carefully, including any linked supporting documentation. You may find it interesting to know more about what's going on, and it may save the need for a one-on-one conversation.
If you wish to share your concerns, see the contact info below.
We’ll try to use global owners approvers as often as possible to avoid spreading the burden to teams who maintain code/libraries commonly affected by refactorings.
Have you considered removing yourself from the OWNERS file? If you aren‘t willing and capable of doing reviews, you probably shouldn’t be an OWNER.