cbuildbot_config: Mark release builds important.

This introduces a variable, "IS_RELEASE_BRANCH", that, when True, causes
all important canaries to be assigned to the release waterfall.
Consequently, manual release waterfall provisioning has been removed.

It also updates the configurations to remove the 'important' flag from
configs that don't belong on the release waterfall.

BUG=chromium:456203
TEST=`./cbuildbot/run_tests`

Change-Id: If6cb48e0e27d8b1f7486183a53c03ccaec86a28b
Reviewed-on: https://chromium-review.googlesource.com/266093
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Tested-by: Daniel Jacques <dnj@chromium.org>
diff --git a/cbuildbot/cbuildbot_config.py b/cbuildbot/cbuildbot_config.py
index 19d88b0..0d7c692 100755
--- a/cbuildbot/cbuildbot_config.py
+++ b/cbuildbot/cbuildbot_config.py
@@ -15,6 +15,9 @@
 import copy
 import json
 
+# Set to 'True' if this is a release branch.
+IS_RELEASE_BRANCH = True
+
 GS_PATH_DEFAULT = 'default' # Means gs://chromeos-image-archive/ + bot_id
 
 # Contains the valid build config suffixes in the order that they are dumped.
@@ -178,17 +181,27 @@
     return None
 
   b_type = build_config['build_type']
-  if (
-      IsPFQType(b_type) or
-      IsCQType(b_type) or
-      IsCanaryType(b_type) or
-      b_type in (
-        constants.PRE_CQ_LAUNCHER_TYPE,
-      )):
-    if build_config['internal']:
-      return constants.WATERFALL_INTERNAL
-    else:
+
+  if IsCanaryType(b_type):
+    # If this is a canary build, it may fall on different waterfalls:
+    # - If we're building for a release branch, it belongs on a release
+    #   waterfall.
+    # - Otherwise, it belongs on the internal waterfall.
+    if IS_RELEASE_BRANCH:
+      return constants.WATERFALL_RELEASE
+    return constants.WATERFALL_INTERNAL
+  elif IsCQType(b_type):
+    # A Paladin can appear on the public or internal waterfall depending on its
+    # 'internal' status.
+    if not build_config['internal']:
       return constants.WATERFALL_EXTERNAL
+    return constants.WATERFALL_INTERNAL
+  elif (IsPFQType(b_type) or
+        b_type in (
+            constants.PRE_CQ_LAUNCHER_TYPE,
+        )):
+    # These builder types belong on the internal waterfall.
+    return constants.WATERFALL_INTERNAL
 
 
 # List of usable cbuildbot configs; see add_config method.
@@ -2494,12 +2507,13 @@
 
 _release.add_config('master-release',
   boards=[],
-  master=True,
   sync_chrome=False,
   chrome_sdk=False,
   health_alert_recipients=['chromeos-infra-eng@grotations.appspotmail.com',
                            'tree'],
   afdo_use=False,
+  important=False,
+  master=False,
 )
 
 ### Release config groups.
@@ -2611,14 +2625,13 @@
 
 _release.add_config('gizmo-release',
   _base_configs['gizmo'],
-  important=True,
   paygen=False,
   signer_tests=False,
 )
 
 _release.add_config('lemmings-release',
   _base_configs['lemmings'],
-  important=True,
+  important=False,
   paygen=False,
   signer_tests=False,
 )
@@ -2662,7 +2675,7 @@
 _release.add_config('panther_embedded-minimal-release',
   _base_configs['panther_embedded'],
   profile='minimal',
-  important=True,
+  important=False,
   paygen=False,
   signer_tests=False,
 )
@@ -2679,7 +2692,7 @@
   _beaglebone_release.add_config('beaglebone_servo-release',
     boards=['beaglebone_servo'],
   ).derive(_grouped_variant_config),
-  important=True,
+  important=False,
 )
 
 _release.add_config('kayle-release',
@@ -2725,7 +2738,7 @@
   paygen_skip_delta_payloads=True,
   # TODO: re-enable paygen testing when crbug.com/386473 is fixed.
   paygen_skip_testing=True,
-  important=True,
+  important=False,
   afdo_use=False,
   signer_tests=False,
   hw_tests=[HWTestConfig(constants.HWTEST_MOBLAB_SUITE, blocking=True, num=1,
@@ -2806,7 +2819,9 @@
 ), (
     'x86-alex_he',
     'x86-zgb_he',
-))
+),
+    important=False,
+)
 
 # sandybridge chipset boards
 _AddGroupConfig('sandybridge', 'parrot', (
@@ -2820,7 +2835,9 @@
     'lumpy_freon',
     'butterfly_freon',
     'stumpy_freon',
-))
+),
+    important=False,
+)
 
 # ivybridge chipset boards
 _AddGroupConfig('ivybridge-freon', 'stout', (
@@ -2947,6 +2964,7 @@
 _AddGroupConfig('veyron-c', 'veyron_brain', (
     'veyron_danger',
     ),
+    important=False,
 )
 
 # jecht-based boards
@@ -3214,43 +3232,12 @@
 #
 # TODO(dnj): This should go away once the boardless release master is complete
 # (crbug.com/458675)
-config['x86-mario-release']['master'] = True
+config['x86-mario-release']['master'] = IS_RELEASE_BRANCH
 
 # This is a list of configs that should be included on the main waterfall, but
 # aren't included by default (see IsDefaultMainWaterfall). This loosely
 # corresponds to the set of experimental or self-standing configs.
-_waterfall_config_map = {
-    constants.WATERFALL_RELEASE: frozenset([
-      # Board builders
-      'samus-release',
-      'storm-release',
-      'whirlwind-release',
-      'x86-mario-release',
-
-      # Group Builders
-      'auron-b-release-group',
-      'auron-release-group',
-      'beltino-a-release-group',
-      'beltino-b-release-group',
-      'daisy-freon-release-group',
-      'daisy-release-group',
-      'ivybridge-freon-release-group',
-      'jecht-release-group',
-      'nyan-release-group',
-      'peach-freon-release-group',
-      'peach-release-group',
-      'rambi-a-release-group',
-      'rambi-b-release-group',
-      'rambi-c-release-group',
-      'rambi-d-release-group',
-      'sandybridge-release-group',
-      'slippy-release-group',
-      'veyron-b-release-group',
-      'veyron-release-group',
-      'x86-alex-release-group',
-      'x86-zgb-release-group',
-    ]),
-}
+_waterfall_config_map = {}
 
 def _SetupWaterfalls():
   for name, c in config.iteritems():
diff --git a/cbuildbot/config_dump.json b/cbuildbot/config_dump.json
index 962b92e..47ede4a 100644
--- a/cbuildbot/config_dump.json
+++ b/cbuildbot/config_dump.json
@@ -4847,7 +4847,6 @@
         "vm_tests": []
     },
     "beaglebone-release-group": {
-        "active_waterfall": "chromeos",
         "child_configs": [
             {
                 "archive_build_debug": true,
@@ -4932,7 +4931,6 @@
                 "vm_tests": []
             }
         ],
-        "important": true,
         "name": "beaglebone-release-group"
     },
     "beaglebone-tot-chrome-pfq-informational": {
@@ -11507,7 +11505,6 @@
         "name": "daisy-freon-full-group"
     },
     "daisy-freon-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -18527,7 +18524,6 @@
         "vm_tests": []
     },
     "gizmo-release": {
-        "active_waterfall": "chromeos",
         "archive_build_debug": true,
         "binhost_base_url": "https://commondatastorage.googleapis.com/chromeos-dev-installer",
         "binhost_bucket": "gs://chromeos-dev-installer",
@@ -18547,7 +18543,6 @@
             "test",
             "factory_install"
         ],
-        "important": true,
         "internal": true,
         "manifest": "official.xml",
         "manifest_repo_url": "https://chrome-internal-review.googlesource.com/chromeos/manifest-internal",
@@ -21794,7 +21789,6 @@
         ]
     },
     "jecht-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -23882,7 +23876,6 @@
         "vm_tests": []
     },
     "lemmings-release": {
-        "active_waterfall": "chromeos",
         "archive_build_debug": true,
         "binhost_base_url": "https://commondatastorage.googleapis.com/chromeos-dev-installer",
         "binhost_bucket": "gs://chromeos-dev-installer",
@@ -23902,7 +23895,6 @@
             "test",
             "factory_install"
         ],
-        "important": true,
         "internal": true,
         "manifest": "official.xml",
         "manifest_repo_url": "https://chrome-internal-review.googlesource.com/chromeos/manifest-internal",
@@ -27117,7 +27109,6 @@
         "vm_tests": []
     },
     "master-release": {
-        "active_waterfall": "chromeos",
         "archive_build_debug": true,
         "binhost_base_url": "https://commondatastorage.googleapis.com/chromeos-dev-installer",
         "binhost_bucket": "gs://chromeos-dev-installer",
@@ -27151,7 +27142,6 @@
         "manifest": "official.xml",
         "manifest_repo_url": "https://chrome-internal-review.googlesource.com/chromeos/manifest-internal",
         "manifest_version": true,
-        "master": true,
         "name": "master-release",
         "overlays": "both",
         "paygen": true,
@@ -33691,7 +33681,6 @@
         "vm_tests": []
     },
     "panther_embedded-minimal-release": {
-        "active_waterfall": "chromeos",
         "archive_build_debug": true,
         "binhost_base_url": "https://commondatastorage.googleapis.com/chromeos-dev-installer",
         "binhost_bucket": "gs://chromeos-dev-installer",
@@ -33711,7 +33700,6 @@
             "test",
             "factory_install"
         ],
-        "important": true,
         "internal": true,
         "manifest": "official.xml",
         "manifest_repo_url": "https://chrome-internal-review.googlesource.com/chromeos/manifest-internal",
@@ -36861,7 +36849,6 @@
         "name": "peach-freon-full-group"
     },
     "peach-freon-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -39943,7 +39930,6 @@
         "name": "pineview-full-group"
     },
     "pineview-release-group": {
-        "active_waterfall": "chromeos",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -40196,7 +40182,6 @@
             }
         ],
         "description": "Release Builds (canary) (internal); Group config (boards: x86-mario, x86-alex, x86-zgb, x86-alex_he, x86-zgb_he)",
-        "important": true,
         "name": "pineview-release-group"
     },
     "pre-cq-group": {
@@ -42762,7 +42747,6 @@
         "name": "rambi-d-full-group"
     },
     "rambi-d-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -45830,7 +45814,6 @@
         "name": "sandybridge-freon-full-group"
     },
     "sandybridge-freon-release-group": {
-        "active_waterfall": "chromeos",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -46043,7 +46026,6 @@
             }
         ],
         "description": "Release Builds (canary) (internal); Group config (boards: parrot_freon, lumpy_freon, butterfly_freon, stumpy_freon)",
-        "important": true,
         "name": "sandybridge-freon-release-group"
     },
     "sandybridge-full-group": {
@@ -51395,7 +51377,6 @@
         "vm_tests": []
     },
     "stumpy_moblab-release": {
-        "active_waterfall": "chromeos",
         "archive_build_debug": true,
         "binhost_base_url": "https://commondatastorage.googleapis.com/chromeos-dev-installer",
         "binhost_bucket": "gs://chromeos-dev-installer",
@@ -51421,7 +51402,6 @@
             "base",
             "test"
         ],
-        "important": true,
         "internal": true,
         "manifest": "official.xml",
         "manifest_repo_url": "https://chrome-internal-review.googlesource.com/chromeos/manifest-internal",
@@ -55059,7 +55039,6 @@
         "name": "veyron-b-full-group"
     },
     "veyron-b-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -55342,7 +55321,6 @@
         "name": "veyron-c-full-group"
     },
     "veyron-c-release-group": {
-        "active_waterfall": "chromeos",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -55450,7 +55428,6 @@
             }
         ],
         "description": "Release Builds (canary) (internal); Group config (boards: veyron_brain, veyron_danger)",
-        "important": true,
         "name": "veyron-c-release-group"
     },
     "veyron-full-group": {
@@ -63177,7 +63154,6 @@
         ]
     },
     "x86-alex-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,
@@ -65199,7 +65175,6 @@
         ]
     },
     "x86-zgb-release-group": {
-        "active_waterfall": "chromeos_release",
         "child_configs": [
             {
                 "afdo_use": true,