Skip to content

Commit

Permalink
Fix cq cfg sorting
Browse files Browse the repository at this point in the history
Seems to have broken at some point.

Also adds an assert, which should help it not break in the future.

Bug: 888810
Change-Id: Ie8160ceee170dfb75d71f46d0e4f1a10eed78b6f
Reviewed-on: https://chromium-review.googlesource.com/c/1428562
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Auto-Submit: Stephen Martinis <martiniss@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625057}
  • Loading branch information
martiniss authored and Commit Bot committed Jan 23, 2019
1 parent ddd4f72 commit 9af84e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/infra/cq_builders.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ These builders must pass before a CL may land.

* [ios-simulator](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/ios-simulator) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+ios-simulator)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+ios-simulator))

* [linux-chromeos-rel](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-chromeos-rel) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+linux-chromeos-rel)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+linux-chromeos-rel))

* [linux-chromeos-compile-dbg](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-chromeos-compile-dbg) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+linux-chromeos-compile-dbg)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+linux-chromeos-compile-dbg))

* [linux-chromeos-rel](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-chromeos-rel) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+linux-chromeos-rel)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+linux-chromeos-rel))

* [linux-jumbo-rel](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-jumbo-rel) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+linux-jumbo-rel)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+linux-jumbo-rel))

* [linux-libfuzzer-asan-rel](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-libfuzzer-asan-rel) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+linux-libfuzzer-asan-rel)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+linux-libfuzzer-asan-rel))
Expand All @@ -68,14 +68,14 @@ These builders must pass before a CL may land.

* [mac_chromium_rel_ng](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/mac_chromium_rel_ng) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+mac_chromium_rel_ng)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+mac_chromium_rel_ng))

* [win-libfuzzer-asan-rel](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win-libfuzzer-asan-rel) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+win-libfuzzer-asan-rel)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+win-libfuzzer-asan-rel))

* [win10_chromium_x64_rel_ng](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win10_chromium_x64_rel_ng) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+win10_chromium_x64_rel_ng)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+win10_chromium_x64_rel_ng))

* [win7_chromium_rel_ng](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7_chromium_rel_ng) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+win7_chromium_rel_ng)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+win7_chromium_rel_ng))

* [win_chromium_compile_dbg_ng](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win_chromium_compile_dbg_ng) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+win_chromium_compile_dbg_ng)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+win_chromium_compile_dbg_ng))

* [win-libfuzzer-asan-rel](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win-libfuzzer-asan-rel) ([`cq.cfg` entry](https://cs.chromium.org/search/?q=package:%5Echromium$+file:cq.cfg+win-libfuzzer-asan-rel)) ([matching builders](https://cs.chromium.org/search/?q=file:trybots.py+win-libfuzzer-asan-rel))


## Optional builders

Expand Down
4 changes: 2 additions & 2 deletions infra/config/branch/cq.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ verifiers {
builders { name: "fuchsia_arm64" }
builders { name: "fuchsia_x64" }
builders { name: "ios-simulator" }
builders { name: "linux-chromeos-rel" }
builders { name: "linux-chromeos-compile-dbg" }
builders { name: "linux-chromeos-rel" }
builders { name: "linux-jumbo-rel" }
builders { name: "linux-libfuzzer-asan-rel" }
builders { name: "linux-ozone-rel" }
Expand All @@ -88,10 +88,10 @@ verifiers {
builders { name: "linux_chromium_tsan_rel_ng" }
builders { name: "mac_chromium_compile_dbg_ng" }
builders { name: "mac_chromium_rel_ng" }
builders { name: "win-libfuzzer-asan-rel" }
builders { name: "win10_chromium_x64_rel_ng" }
builders { name: "win7_chromium_rel_ng"}
builders { name: "win_chromium_compile_dbg_ng" }
builders { name: "win-libfuzzer-asan-rel" }

######################
# Optional builders. #
Expand Down
4 changes: 3 additions & 1 deletion infra/config/branch/cq_cfg_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def builder_list(self, pred=None):
for bucket in (
self._value['verifiers'][0]['try_job'][0]['buckets']):
for b in bucket['builders']:
if pred and not pred(bucket, b):
if pred and not pred(bucket['name'][0], b):
continue
items.append(b)
return BuilderList(items)
Expand Down Expand Up @@ -331,6 +331,8 @@ def main():
# Only force sorting on luci.chromium.try builders. Others should go away soon
# anyways...
bl = cfg.builder_list(lambda bucket, builder: bucket == 'luci.chromium.try')
assert len(bl.builders) > 0, (
'Builders in \'luci.chromium.try\' bucket are missing somehow...')
names = [b['name'][0] for b in bl.builders]
bl.sort() # Changes the bl, so the next line is sorted.
sorted_names = [b['name'][0] for b in bl.builders]
Expand Down

0 comments on commit 9af84e0

Please sign in to comment.