Skip to content

Commit f826616

Browse files
dprankeCommit Bot
authored and
Commit Bot
committed
Remove gerrit-buildbucket-config command from MB.
The Gerrit plugin will now automatically populate the list of tryservers from LUCI, meaning that we no longer need to manually configure things and don't need to generate a config file from the MB entries. Accordingly, this CL removes the `gerrit-buildbucket-config` code from MB. Bug: 813196 Change-Id: I1c4ba1099a11822c2c741eb21dc61e4f5a163369 Reviewed-on: https://chromium-review.googlesource.com/1053377 Reviewed-by: Nodir Turakulov <nodir@chromium.org> Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Dirk Pranke <dpranke@chromium.org> Cr-Commit-Position: refs/heads/master@{#557416}
1 parent 91e9582 commit f826616

File tree

4 files changed

+0
-68
lines changed

4 files changed

+0
-68
lines changed

tools/mb/docs/user_guide.md

-15
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,6 @@ Builds and isolates a given (ninja) target like the `isolate` command does,
186186
and then takes all of the files in the isolate and writes them into a single
187187
zip file that can then easily be redistributed.
188188

189-
### mb gerrit-buildbucket-config
190-
191-
Generates a gerrit buildbucket configuration file and prints it to
192-
stdout. This file contains the list of trybots shown in gerrit's UI.
193-
194-
The master copy of the buildbucket.config file lives
195-
in a separate branch of the chromium repository. Run `mb
196-
gerrit-buildbucket-config > buildbucket.config.new && git fetch origin
197-
refs/meta/config:refs/remotes/origin/meta/config && git checkout
198-
-t -b meta_config origin/meta/config && mv buildbucket.config.new
199-
buildbucket.config` to update the file.
200-
201-
Note that after committing, `git cl upload` will not work. Instead, use `git
202-
push origin HEAD:refs/for/refs/meta/config` to upload the CL for review.
203-
204189
## Isolates and Swarming
205190

206191
`mb gen` is also responsible for generating the `.isolate` and

tools/mb/mb.py

-29
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def __init__(self):
5454
self.sep = os.sep
5555
self.args = argparse.Namespace()
5656
self.configs = {}
57-
self.luci_tryservers = {}
5857
self.masters = {}
5958
self.mixins = {}
6059

@@ -222,14 +221,6 @@ def AddCommonOptions(subp):
222221
help='path to config file (default is %(default)s)')
223222
subp.set_defaults(func=self.CmdValidate)
224223

225-
subp = subps.add_parser('gerrit-buildbucket-config',
226-
help='Print buildbucket.config for gerrit '
227-
'(see MB user guide)')
228-
subp.add_argument('-f', '--config-file', metavar='PATH',
229-
default=self.default_config,
230-
help='path to config file (default is %(default)s)')
231-
subp.set_defaults(func=self.CmdBuildbucket)
232-
233224
subp = subps.add_parser('zip',
234225
help='generate a .zip containing the files needed '
235226
'for a given binary')
@@ -483,25 +474,6 @@ def _DefaultDimensions(self):
483474
('cpu', 'x86-64'),
484475
os_dim]
485476

486-
def CmdBuildbucket(self):
487-
self.ReadConfigFile()
488-
489-
self.Print('# This file was generated using '
490-
'"tools/mb/mb.py gerrit-buildbucket-config".')
491-
492-
for luci_tryserver in sorted(self.luci_tryservers):
493-
self.Print('[bucket "luci.%s"]' % luci_tryserver)
494-
for bot in sorted(self.luci_tryservers[luci_tryserver]):
495-
self.Print('\tbuilder = %s' % bot)
496-
497-
for master in sorted(self.masters):
498-
if master.startswith('tryserver.'):
499-
self.Print('[bucket "master.%s"]' % master)
500-
for bot in sorted(self.masters[master]):
501-
self.Print('\tbuilder = %s' % bot)
502-
503-
return 0
504-
505477
def CmdValidate(self, print_ok=True):
506478
errs = []
507479

@@ -665,7 +637,6 @@ def ReadConfigFile(self):
665637
(self.args.config_file, e))
666638

667639
self.configs = contents['configs']
668-
self.luci_tryservers = contents.get('luci_tryservers', {})
669640
self.masters = contents['masters']
670641
self.mixins = contents['mixins']
671642

tools/mb/mb_config.pyl

-4
Original file line numberDiff line numberDiff line change
@@ -2122,8 +2122,4 @@
21222122
'gn_args': 'target_cpu="x86"',
21232123
},
21242124
},
2125-
2126-
'luci_tryservers': {
2127-
'chromium.try': [ 'linux_chromium_rel_ng' ],
2128-
},
21292125
}

tools/mb/mb_unittest.py

-20
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ def close(self):
190190
'try_builder2': 'fake_config',
191191
},
192192
},
193-
'luci_tryservers': {
194-
'luci_tryserver1': ['luci_builder1'],
195-
'luci_tryserver2': ['luci_builder2'],
196-
},
197193
'configs': {},
198194
'mixins': {},
199195
}
@@ -631,22 +627,6 @@ def test_bad_validate(self):
631627
mbw.files[mbw.default_config] = TEST_BAD_CONFIG
632628
self.check(['validate'], mbw=mbw, ret=1)
633629

634-
def test_buildbucket(self):
635-
mbw = self.fake_mbw()
636-
mbw.files[mbw.default_config] = TRYSERVER_CONFIG
637-
self.check(['gerrit-buildbucket-config'], mbw=mbw,
638-
ret=0,
639-
out=('# This file was generated using '
640-
'"tools/mb/mb.py gerrit-buildbucket-config".\n'
641-
'[bucket "luci.luci_tryserver1"]\n'
642-
'\tbuilder = luci_builder1\n'
643-
'[bucket "luci.luci_tryserver2"]\n'
644-
'\tbuilder = luci_builder2\n'
645-
'[bucket "master.tryserver.chromium.linux"]\n'
646-
'\tbuilder = try_builder\n'
647-
'[bucket "master.tryserver.chromium.mac"]\n'
648-
'\tbuilder = try_builder2\n'))
649-
650630
def test_build_command_unix(self):
651631
files = {
652632
'/fake_src/out/Default/toolchain.ninja': '',

0 commit comments

Comments
 (0)