Bug 1550611 - Add nightly attribute to shippable builds. r=darktrojan
authorRob Lemley <rob@thunderbird.net>
Wed, 30 Oct 2019 23:57:42 -0400
changeset 36580 d1762836541f897bc8d9230f997d88061fdd2fe5
parent 36579 492c97f2e864c6f30a4ea09ad9f9d2828be06b0f
child 36581 067c9af97ec99abc81b84a5340777a08cada782f
push id2534
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:52:51 +0000
treeherdercomm-beta@055c50840778 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdarktrojan
bugs1550611
Bug 1550611 - Add nightly attribute to shippable builds. r=darktrojan Addresses the unnecessary builds that happen on push. Specifically adding the nightly attribute addresses the Seamonkey-only shippable builds that run while still running those shippable builds for the Daily/Nightly cron job. For tests, a different method was needed or they would not run on a Daily build if the last push was Seamonkey-only. For this the only-when-files-changed optimization is removed when the associated build has the nightly attribute set.
taskcluster/ci/build/linux.yml
taskcluster/ci/build/macosx.yml
taskcluster/ci/build/windows.yml
taskcluster/comm_taskgraph/transforms/tests.py
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -34,16 +34,17 @@ linux64/opt:
             - linux64-node
             - linux64-rust
             - linux64-sccache
 
 linux64-shippable/opt:
     description: "Linux64 Shippable"
     attributes:
         shippable: true
+        nightly: true
         enable-full-crashsymbols: true
     shipping-phase: build
     shipping-product: thunderbird
     index:
         product: thunderbird
         job-name: linux64-opt
         type: shippable
     treeherder:
@@ -141,16 +142,17 @@ linux/opt:
             - linux64-node
             - linux64-rust
             - linux64-sccache
 
 linux-shippable/opt:
     description: "Linux32 Shippable"
     attributes:
         shippable: true
+        nightly: true
         enable-full-crashsymbols: true
     shipping-phase: build
     shipping-product: thunderbird
     index:
         product: thunderbird
         job-name: linux32-opt
         type: shippable
     treeherder:
--- a/taskcluster/ci/build/macosx.yml
+++ b/taskcluster/ci/build/macosx.yml
@@ -83,16 +83,17 @@ macosx64/opt:
             - linux64-node
             - linux64-rust-macos
             - linux64-sccache
 
 macosx64-shippable/opt:
     description: "MacOS X x64 Cross-compile"
     attributes:
         shippable: true
+        nightly: true
         enable-full-crashsymbols: true
     shipping-phase: build
     shipping-product: thunderbird
     index:
         product: thunderbird
         job-name: macosx64-opt
         type: shippable
     treeherder:
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -46,16 +46,17 @@ win32/opt:
 win32-shippable/opt:
     description: "Win32 Opt Shippable"
     index:
         product: thunderbird
         job-name: win32-opt
         type: shippable
     attributes:
         shippable: true
+        nightly: true
         enable-full-crashsymbols: true
     shipping-phase: build
     shipping-product: thunderbird
     treeherder:
         platform: windows2012-32-shippable/opt
         symbol: B
         tier: 1
     worker-type: b-win2012
@@ -151,16 +152,17 @@ win64/opt:
 win64-shippable/opt:
     description: "Win64 Opt Shippable"
     index:
         product: thunderbird
         job-name: win64-opt
         type: shippable
     attributes:
         shippable: true
+        nightly: true
         enable-full-crashsymbols: true
     shipping-phase: build
     shipping-product: thunderbird
     treeherder:
         platform: windows2012-64-shippable/opt
         symbol: B
         tier: 1
     worker-type: b-win2012
--- a/taskcluster/comm_taskgraph/transforms/tests.py
+++ b/taskcluster/comm_taskgraph/transforms/tests.py
@@ -52,8 +52,25 @@ def tests_drop_1proc(config, jobs):
                 group = add_suffix(group, '-e10s')
             test['treeherder-symbol'] = join_symbol(group, symbol)
 
             job['label'] += '-e10s'
             job['name'] = add_suffix(job['name'], '-e10s')
             job['treeherder']['symbol'] = test['treeherder-symbol']
 
         yield job
+
+
+@transforms.add
+def always_nightly(config, jobs):
+    """
+    Ideally, we could set "always_target" to true, but that doesn't work for
+    test jobs. Instead, undo the optimization but only if the associated build
+    job is tagged with "nightly".
+    """
+    for job in jobs:
+        if config.params['target_tasks_method'] == 'nightly_desktop':
+            attributes = job['attributes']
+            if attributes.get('nightly', None):
+                if 'when' in job:
+                    del job['when']
+
+        yield job