Skip to content

Commit 04b837a

Browse files
zhaoyangliCommit Bot
zhaoyangli
authored and
Commit Bot
committed
Generate fully-qualified builder dimension for branched iOS builders.
iOS is going to build with Xcode 12 sdk in trunk builders, but branched ci/try builders have to use Xcode 11. There are issues when using Xcode 11 & Xcode 12 on one machine. Thus, we need to separate the machines for iOS trunk and branched builders. This CL adds an argument to builders.star to generate builder dimension with project & bucket and uses the argument for iOS branched builders. Credit to gbeaty@ for the change in "infra/config/lib/builders.star" (patched from crrev/c/2360500) Bug: 1115022 Change-Id: Ic682e3014073e07a9526e14997dd4c170f11d9de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363691 Reviewed-by: Stephen Martinis <martiniss@chromium.org> Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org> Cr-Commit-Position: refs/heads/master@{#799299}
1 parent 59e8a56 commit 04b837a

File tree

6 files changed

+44
-14
lines changed

6 files changed

+44
-14
lines changed

infra/config/generated/cr-buildbucket.cfg

+12-12
Original file line numberDiff line numberDiff line change
@@ -14284,7 +14284,7 @@ buckets {
1428414284
name: "ios-simulator"
1428514285
swarming_host: "chromium-swarm.appspot.com"
1428614286
swarming_tags: "vpython:native-python-wrapper"
14287-
dimensions: "builder:ios-simulator"
14287+
dimensions: "builder:chromium/ci-m84/ios-simulator"
1428814288
dimensions: "cpu:x86-64"
1428914289
dimensions: "os:Mac-10.15"
1429014290
dimensions: "pool:luci.chromium.ci"
@@ -14315,7 +14315,7 @@ buckets {
1431514315
name: "ios-simulator-cronet"
1431614316
swarming_host: "chromium-swarm.appspot.com"
1431714317
swarming_tags: "vpython:native-python-wrapper"
14318-
dimensions: "builder:ios-simulator-cronet"
14318+
dimensions: "builder:chromium/ci-m84/ios-simulator-cronet"
1431914319
dimensions: "cpu:x86-64"
1432014320
dimensions: "os:Mac-10.15"
1432114321
dimensions: "pool:luci.chromium.ci"
@@ -14346,7 +14346,7 @@ buckets {
1434614346
name: "ios-simulator-full-configs"
1434714347
swarming_host: "chromium-swarm.appspot.com"
1434814348
swarming_tags: "vpython:native-python-wrapper"
14349-
dimensions: "builder:ios-simulator-full-configs"
14349+
dimensions: "builder:chromium/ci-m84/ios-simulator-full-configs"
1435014350
dimensions: "cpu:x86-64"
1435114351
dimensions: "os:Mac-10.15"
1435214352
dimensions: "pool:luci.chromium.ci"
@@ -16758,7 +16758,7 @@ buckets {
1675816758
name: "ios-simulator"
1675916759
swarming_host: "chromium-swarm.appspot.com"
1676016760
swarming_tags: "vpython:native-python-wrapper"
16761-
dimensions: "builder:ios-simulator"
16761+
dimensions: "builder:chromium/ci-m85/ios-simulator"
1676216762
dimensions: "cpu:x86-64"
1676316763
dimensions: "os:Mac-10.15"
1676416764
dimensions: "pool:luci.chromium.ci"
@@ -16789,7 +16789,7 @@ buckets {
1678916789
name: "ios-simulator-cronet"
1679016790
swarming_host: "chromium-swarm.appspot.com"
1679116791
swarming_tags: "vpython:native-python-wrapper"
16792-
dimensions: "builder:ios-simulator-cronet"
16792+
dimensions: "builder:chromium/ci-m85/ios-simulator-cronet"
1679316793
dimensions: "cpu:x86-64"
1679416794
dimensions: "os:Mac-10.15"
1679516795
dimensions: "pool:luci.chromium.ci"
@@ -16820,7 +16820,7 @@ buckets {
1682016820
name: "ios-simulator-full-configs"
1682116821
swarming_host: "chromium-swarm.appspot.com"
1682216822
swarming_tags: "vpython:native-python-wrapper"
16823-
dimensions: "builder:ios-simulator-full-configs"
16823+
dimensions: "builder:chromium/ci-m85/ios-simulator-full-configs"
1682416824
dimensions: "cpu:x86-64"
1682516825
dimensions: "os:Mac-10.15"
1682616826
dimensions: "pool:luci.chromium.ci"
@@ -30020,7 +30020,7 @@ buckets {
3002030020
name: "ios-simulator"
3002130021
swarming_host: "chromium-swarm.appspot.com"
3002230022
swarming_tags: "vpython:native-python-wrapper"
30023-
dimensions: "builder:ios-simulator"
30023+
dimensions: "builder:chromium/try-m84/ios-simulator"
3002430024
dimensions: "cpu:x86-64"
3002530025
dimensions: "os:Mac-10.15"
3002630026
dimensions: "pool:luci.chromium.try"
@@ -30059,7 +30059,7 @@ buckets {
3005930059
name: "ios-simulator-cronet"
3006030060
swarming_host: "chromium-swarm.appspot.com"
3006130061
swarming_tags: "vpython:native-python-wrapper"
30062-
dimensions: "builder:ios-simulator-cronet"
30062+
dimensions: "builder:chromium/try-m84/ios-simulator-cronet"
3006330063
dimensions: "cpu:x86-64"
3006430064
dimensions: "os:Mac-10.15"
3006530065
dimensions: "pool:luci.chromium.try"
@@ -30098,7 +30098,7 @@ buckets {
3009830098
name: "ios-simulator-full-configs"
3009930099
swarming_host: "chromium-swarm.appspot.com"
3010030100
swarming_tags: "vpython:native-python-wrapper"
30101-
dimensions: "builder:ios-simulator-full-configs"
30101+
dimensions: "builder:chromium/try-m84/ios-simulator-full-configs"
3010230102
dimensions: "cpu:x86-64"
3010330103
dimensions: "os:Mac-10.15"
3010430104
dimensions: "pool:luci.chromium.try"
@@ -32012,7 +32012,7 @@ buckets {
3201232012
name: "ios-simulator"
3201332013
swarming_host: "chromium-swarm.appspot.com"
3201432014
swarming_tags: "vpython:native-python-wrapper"
32015-
dimensions: "builder:ios-simulator"
32015+
dimensions: "builder:chromium/try-m85/ios-simulator"
3201632016
dimensions: "cpu:x86-64"
3201732017
dimensions: "os:Mac-10.15"
3201832018
dimensions: "pool:luci.chromium.try"
@@ -32051,7 +32051,7 @@ buckets {
3205132051
name: "ios-simulator-cronet"
3205232052
swarming_host: "chromium-swarm.appspot.com"
3205332053
swarming_tags: "vpython:native-python-wrapper"
32054-
dimensions: "builder:ios-simulator-cronet"
32054+
dimensions: "builder:chromium/try-m85/ios-simulator-cronet"
3205532055
dimensions: "cpu:x86-64"
3205632056
dimensions: "os:Mac-10.15"
3205732057
dimensions: "pool:luci.chromium.try"
@@ -32090,7 +32090,7 @@ buckets {
3209032090
name: "ios-simulator-full-configs"
3209132091
swarming_host: "chromium-swarm.appspot.com"
3209232092
swarming_tags: "vpython:native-python-wrapper"
32093-
dimensions: "builder:ios-simulator-full-configs"
32093+
dimensions: "builder:chromium/try-m85/ios-simulator-full-configs"
3209432094
dimensions: "cpu:x86-64"
3209532095
dimensions: "os:Mac-10.15"
3209632096
dimensions: "pool:luci.chromium.try"

infra/config/lib/builders.star

+20-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ for use with the corresponding arguments to `builder`. Can also be accessed
2525
through `builders.cpu`, `builders.os` and `builders.goma` respectively.
2626
"""
2727

28+
load("//project.star", "settings")
2829
load("./args.star", "args")
2930

3031
################################################################################
@@ -242,6 +243,7 @@ defaults = args.defaults(
242243
configure_kitchen = False,
243244
cores = None,
244245
cpu = None,
246+
fully_qualified_builder_dimension = False,
245247
goma_backend = None,
246248
goma_debug = False,
247249
goma_enable_ats = args.COMPUTE,
@@ -278,6 +280,7 @@ def builder(
278280
os = args.DEFAULT,
279281
builderless = args.DEFAULT,
280282
auto_builder_dimension = args.DEFAULT,
283+
fully_qualified_builder_dimension = args.DEFAULT,
281284
cores = args.DEFAULT,
282285
cpu = args.DEFAULT,
283286
builder_group = args.DEFAULT,
@@ -329,6 +332,12 @@ def builder(
329332
machines devoted to the builder. If True, a dimension will be emitted of
330333
the form 'builder:<name>'. By default, considered True iff `builderless`
331334
is considered False.
335+
* fully_qualified_builder_dimension - a boolean modifying the behavior of
336+
auto_builder_dimension to generate a builder dimensions that is
337+
fully-qualified with the project and bucket of the builder. If True, and
338+
`auto_builder_dimension` is considered True, a dimension will be emitted
339+
of the form 'builder:<project>/<bucket>/<name>'. By default, considered
340+
False.
332341
* builder_group - a string with the group of the builder. Emits a property
333342
of the form 'builder_group:<builder_group>'. By default, considered None.
334343
* mastername - a string with the group of the builder. Emits a property
@@ -426,14 +435,24 @@ def builder(
426435
if builderless:
427436
dimensions["builderless"] = "1"
428437

438+
# bucket might be the args.COMPUTE sentinel value if the caller didn't set
439+
# bucket in some way, which will result in a weird fully-qualified builder
440+
# dimension, but it shouldn't matter because the call to luci.builder will
441+
# fail without bucket being set
442+
bucket = defaults.get_value("bucket", bucket)
443+
429444
auto_builder_dimension = defaults.get_value(
430445
"auto_builder_dimension",
431446
auto_builder_dimension,
432447
)
433448
if auto_builder_dimension == args.COMPUTE:
434449
auto_builder_dimension = builderless == False
435450
if auto_builder_dimension:
436-
dimensions["builder"] = name
451+
fully_qualified_builder_dimension = defaults.get_value("fully_qualified_builder_dimension", fully_qualified_builder_dimension)
452+
if fully_qualified_builder_dimension:
453+
dimensions["builder"] = "{}/{}/{}".format(settings.project, bucket, name)
454+
else:
455+
dimensions["builder"] = name
437456

438457
cores = defaults.get_value("cores", cores)
439458
if cores != None:
@@ -498,7 +517,6 @@ def builder(
498517
properties["$build/code_coverage"] = code_coverage
499518

500519
kwargs = dict(kwargs)
501-
bucket = defaults.get_value("bucket", bucket)
502520
if bucket != args.COMPUTE:
503521
kwargs["bucket"] = bucket
504522
executable = defaults.get_value("executable", executable)

infra/config/subprojects/chromium/versioned/m84/buckets/ci.star

+3
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ ci.fyi_ios_builder(
379379
category = "cronet",
380380
),
381381
executable = "recipe:chromium",
382+
fully_qualified_builder_dimension = True,
382383
notifies = ["cronet"],
383384
properties = {
384385
"xcode_build_version": "11c29",
@@ -661,6 +662,7 @@ ci.mac_ios_builder(
661662
category = "ios|default",
662663
short_name = "sim",
663664
),
665+
fully_qualified_builder_dimension = True,
664666
)
665667

666668
ci.mac_ios_builder(
@@ -669,6 +671,7 @@ ci.mac_ios_builder(
669671
category = "ios|default",
670672
short_name = "ful",
671673
),
674+
fully_qualified_builder_dimension = True,
672675
)
673676

674677
ci.memory_builder(

infra/config/subprojects/chromium/versioned/m84/buckets/try.star

+3
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ try_.chromium_mac_builder(
447447
try_.chromium_mac_ios_builder(
448448
name = "ios-simulator",
449449
executable = "recipe:chromium_trybot",
450+
fully_qualified_builder_dimension = True,
450451
properties = {
451452
"xcode_build_version": "11e146",
452453
},
@@ -456,6 +457,7 @@ try_.chromium_mac_ios_builder(
456457
try_.chromium_mac_ios_builder(
457458
name = "ios-simulator-cronet",
458459
executable = "recipe:chromium_trybot",
460+
fully_qualified_builder_dimension = True,
459461
tryjob = try_.job(
460462
location_regexp = [
461463
".+/[+]/components/cronet/.+",
@@ -471,6 +473,7 @@ try_.chromium_mac_ios_builder(
471473
try_.chromium_mac_ios_builder(
472474
name = "ios-simulator-full-configs",
473475
executable = "recipe:chromium_trybot",
476+
fully_qualified_builder_dimension = True,
474477
tryjob = try_.job(
475478
location_regexp = [
476479
".+/[+]/ios/.+",

infra/config/subprojects/chromium/versioned/m85/buckets/ci.star

+3
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ ci.fyi_ios_builder(
439439
console_view_entry = ci.console_view_entry(
440440
category = "cronet",
441441
),
442+
fully_qualified_builder_dimension = True,
442443
executable = "recipe:chromium",
443444
notifies = ["cronet"],
444445
properties = {
@@ -722,6 +723,7 @@ ci.mac_ios_builder(
722723
category = "ios|default",
723724
short_name = "sim",
724725
),
726+
fully_qualified_builder_dimension = True,
725727
)
726728

727729
ci.mac_ios_builder(
@@ -730,6 +732,7 @@ ci.mac_ios_builder(
730732
category = "ios|default",
731733
short_name = "ful",
732734
),
735+
fully_qualified_builder_dimension = True,
733736
)
734737

735738
ci.memory_builder(

infra/config/subprojects/chromium/versioned/m85/buckets/try.star

+3
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ try_.chromium_mac_builder(
459459
try_.chromium_mac_ios_builder(
460460
name = "ios-simulator",
461461
executable = "recipe:chromium_trybot",
462+
fully_qualified_builder_dimension = True,
462463
properties = {
463464
"xcode_build_version": "11e146",
464465
},
@@ -468,6 +469,7 @@ try_.chromium_mac_ios_builder(
468469
try_.chromium_mac_ios_builder(
469470
name = "ios-simulator-cronet",
470471
executable = "recipe:chromium_trybot",
472+
fully_qualified_builder_dimension = True,
471473
tryjob = try_.job(
472474
location_regexp = [
473475
".+/[+]/components/cronet/.+",
@@ -483,6 +485,7 @@ try_.chromium_mac_ios_builder(
483485
try_.chromium_mac_ios_builder(
484486
name = "ios-simulator-full-configs",
485487
executable = "recipe:chromium_trybot",
488+
fully_qualified_builder_dimension = True,
486489
tryjob = try_.job(
487490
location_regexp = [
488491
".+/[+]/ios/.+",

0 commit comments

Comments
 (0)