breadcrumbs: Chromium > page_name: chromium-clobber-landmines title: Chromium Clobber Landmines
Clobber landmines are an easy way to send a targeted clobber to a class of builder machines (i.e. bot machines on build.chromium.org). This can be useful in the following circumstances:
Landmines have the property that if a bot ‘rolls over’ the revision containing them (either forwards or backwards), it will trigger a clobber. This is quite useful for trybots which can be assigned random base revisions, or may even just switch between HEAD and LKGR multiple times per day. Simply clobbering the bot manually once may not be enough to make sure that it's ‘fixed’ for good.
Simply add logic to build/get_landmines.py
in the print_landmines
()
function. There are a variety of parameters which you can use to fine-tune the effect of a landmine:
Landmine parameter/function Example values Description platform() ‘win’, ‘mac’, ‘linux’, ‘ios’, or ‘android’ target platform being built. gyp_defines() {‘component’: ‘static_library’} ... dict()-ification of the GYP_DEFINES env var. distributor() ‘goma’, ‘ib’, or None the distributed compile technology in use for this build. builder() ‘make’, ‘ninja’, ‘xcode’, or ‘msvs’ the builder technology for this build. target ‘Release’, ‘Debug’ the target that print_landmines() is generating landmines for.
To add a landmine for the given configuration, just add()
a message in print_landmines()
, conditioned on the configuration. Try to make the reason for the landmine as descriptive as possible, citing relevant revisions, CLs or bugs.
def print_landmines(target): # ... Other landmines here if platform() == 'win' and builder() == 'ninja': add('Compile on cc_unittests fails due to symbols removed in r185063.')
Q: What happens if I delete/clean up/replace landmines in get_landmines()?
A: This is OK (as in, it won't break anything), but note that it will cause bots which match the configuration of the removed landmines to clobber again.
Sometimes this is done intentionally: if there's a frequently-clobbered configuration it may be expedient to only have one landmine which is replaced when a clobber is needed.
Q: Can I include a landmine in a CL which does other things?
A: If you know that your change will definitely require some bots to clobber, then yes, you SHOULD include it with the rest of the changes.
Q: How do I include a landmine for a change in a different repository (e.g., Blink, Skia)
A: The change to build/get_landmines.py
should be included in the roll (i.e., the CL that changes DEPS to update the revision). You will need to contact the current gardener of your component (listed at the top left of the BuildBot waterfall) and have them apply the change in their roll. See for example 19836002 for an example of adding a landmine during a Blink roll. If a roll lands without a landmine (say thanks to autoroll bot), it's ok to commit a separate CL with just the landmine, ideally as close as possible after the roll, since this leaves little gap between them (you do not need to roll back and have a manual roll+landmine CL, as this is rarely necessary).
Q: I have a question that's not here, whom do I bug?
A: Please bug iannucci@chromium.org.
For a given build:
If you move generated files, then you need to clobber the build, otherwise stale files may be used (if they are found earlier during header search). Subtly, this shows up only on later CLs that change the generated file in the new location, but don‘t overwrite the stale one. See for example Issue 381111 (comment). Further, if this change happens in a separate repository (e.g., Blink), then CLs that change the generated files don’t work until the repo has rolled and a landmine has been added. I.e., the steps are: