Skip to content

Commit 6c5744e

Browse files
pthierNode-ci LUCI CQ
authored andcommitted
Add landmine support
Add support for landmines to node-ci. This is a prerequisite to switch to node in-tree gn config files. Bug: v8:14572 Change-Id: I4194bd4e9dfaa8b1f1ca5b858f40bb724b025386 Reviewed-on: https://chromium-review.googlesource.com/c/v8/node-ci/+/5212069 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org>
1 parent b64fbbb commit 6c5744e

3 files changed

Lines changed: 54 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212

1313
# Generated
1414
/node_files.json
15+
/.landmines

DEPS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@ deps = {
164164
}
165165

166166
hooks = [
167+
{
168+
# This clobbers when necessary (based on get_landmines.py). It must be the
169+
# first hook so that other things that get/generate into the output
170+
# directory will not subsequently be clobbered.
171+
'name': 'landmines',
172+
'pattern': '.',
173+
'action': [
174+
'python3',
175+
'node-ci/build/landmines.py',
176+
'--landmine-scripts',
177+
'node-ci/tools/get_landmines.py',
178+
],
179+
},
167180
{
168181
'name': 'generate_node_filelist',
169182
'pattern': 'node-ci/node',

tools/get_landmines.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python3
2+
# Copyright 2024 the V8 project authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
6+
"""
7+
This file emits the list of reasons why a particular build needs to be clobbered
8+
(or a list of 'landmines').
9+
"""
10+
11+
import os
12+
import sys
13+
14+
sys.path.insert(0, os.path.abspath(
15+
os.path.join(os.path.dirname(__file__), '..', 'build')))
16+
17+
import get_landmines as build_get_landmines
18+
19+
20+
def print_landmines(): # pylint: disable=invalid-name
21+
"""
22+
ALL LANDMINES ARE EMITTED FROM HERE.
23+
"""
24+
# DO NOT add landmines as part of a regular CL. Landmines are a last-effort
25+
# bandaid fix if a CL that got landed has a build dependency bug and all bots
26+
# need to be cleaned up. If you're writing a new CL that causes build
27+
# dependency problems, fix the dependency problems instead of adding a
28+
# landmine.
29+
# See the Chromium version in src/build/get_landmines.py for usage examples.
30+
build_get_landmines.print_landmines()
31+
return 0
32+
33+
34+
def main():
35+
print_landmines()
36+
return 0
37+
38+
39+
if __name__ == '__main__':
40+
sys.exit(main())

0 commit comments

Comments
 (0)