Commit 43452799 authored by Stephen Martinis's avatar Stephen Martinis Committed by Commit Bot

Enforce chromium CQ production freeze

This CL modifies the PRESUBMIT.py files in directories which are likely
to affect the Chromium CQ. It changes it to require a git footer in CLs
which touch them, and adds an error message if the footer isn't present.
See the linked bug for more details on the production freeze.

No-Try: true
Ignore-CQ-Freeze: Implementing CQ Freeze
Bug: 1109980
Change-Id: Ibfd41a2a0cf7a8f3f0e6a1ad930e3e2e6b8407d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2320992Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792269}
parent 8545033d
# This is reserved for people that are comfortable with Chromium builders # This is reserved for people that are comfortable with Chromium builders
# and understand the implications of changing their configurations. # and understand the implications of changing their configurations.
# Troopers
bpastene@chromium.org bpastene@chromium.org
dpranke@chromium.org
dpranke@google.com
estaab@chromium.org estaab@chromium.org
gbeaty@chromium.org gbeaty@chromium.org
martiniss@chromium.org
# Other folks who understand the infrastructure well.
dpranke@chromium.org
dpranke@google.com
hans@chromium.org hans@chromium.org
kbr@chromium.org kbr@chromium.org
martiniss@chromium.org
thakis@chromium.org thakis@chromium.org
tikuta@chromium.org tikuta@chromium.org
ynovikov@chromium.org ynovikov@chromium.org
......
...@@ -9,6 +9,23 @@ for more details on the presubmit API built into depot_tools. ...@@ -9,6 +9,23 @@ for more details on the presubmit API built into depot_tools.
""" """
# TODO(crbug.com/1109980): Remove this once the production freeze is over, which
# is expected to be on August 3rd.
def EnforceProductionFreeze(input_api, output_api):
footers = input_api.change.GitFootersFromDescription()
if footers.get('Ignore-Cq-Freeze'):
return []
message = """
Your change is modifying files which may impact the Chromium CQ. The Chromium
CQ is currently in a production freeze. Please get a review from someone in
the //infra/OWNERS file (preferably a trooper), and then add the
'Ignore-CQ-Freeze' git footer to your CL. See https://crbug.com/1109980 for
more details.
"""
return [output_api.PresubmitError(message)]
def _CommonChecks(input_api, output_api): def _CommonChecks(input_api, output_api):
commands = [] commands = []
...@@ -41,6 +58,7 @@ def _CommonChecks(input_api, output_api): ...@@ -41,6 +58,7 @@ def _CommonChecks(input_api, output_api):
results.extend(input_api.RunTests(commands)) results.extend(input_api.RunTests(commands))
results.extend(input_api.canned_checks.CheckChangedLUCIConfigs( results.extend(input_api.canned_checks.CheckChangedLUCIConfigs(
input_api, output_api)) input_api, output_api))
results.extend(EnforceProductionFreeze(input_api, output_api))
return results return results
......
...@@ -9,6 +9,23 @@ for more details on the presubmit API built into depot_tools. ...@@ -9,6 +9,23 @@ for more details on the presubmit API built into depot_tools.
""" """
# TODO(crbug.com/1109980): Remove this once the production freeze is over, which
# is expected to be on August 3rd.
def EnforceProductionFreeze(input_api, output_api):
footers = input_api.change.GitFootersFromDescription()
if footers.get('Ignore-Cq-Freeze'):
return []
message = """
Your change is modifying files which may impact the Chromium CQ. The Chromium
CQ is currently in a production freeze. Please get a review from someone in
the //infra/OWNERS file (preferably a trooper), and then add the
'Ignore-CQ-Freeze' git footer to your CL. See https://crbug.com/1109980 for
more details.
"""
return [output_api.PresubmitError(message)]
def CommonChecks(input_api, output_api): def CommonChecks(input_api, output_api):
commands = [ commands = [
input_api.Command( input_api.Command(
...@@ -42,6 +59,7 @@ def CommonChecks(input_api, output_api): ...@@ -42,6 +59,7 @@ def CommonChecks(input_api, output_api):
messages = [] messages = []
messages.extend(input_api.RunTests(commands)) messages.extend(input_api.RunTests(commands))
messages.extend(EnforceProductionFreeze(input_api, output_api))
return messages return messages
......
...@@ -3,6 +3,23 @@ ...@@ -3,6 +3,23 @@
# found in the LICENSE file. # found in the LICENSE file.
# TODO(crbug.com/1109980): Remove this once the production freeze is over, which
# is expected to be on August 3rd.
def EnforceProductionFreeze(input_api, output_api):
footers = input_api.change.GitFootersFromDescription()
if footers.get('Ignore-Cq-Freeze'):
return []
message = """
Your change is modifying files which may impact the Chromium CQ. The Chromium
CQ is currently in a production freeze. Please get a review from someone in
the //infra/OWNERS file (preferably a trooper), and then add the
'Ignore-CQ-Freeze' git footer to your CL. See https://crbug.com/1109980 for
more details.
"""
return [output_api.PresubmitError(message)]
def _CommonChecks(input_api, output_api): def _CommonChecks(input_api, output_api):
results = [] results = []
...@@ -21,6 +38,7 @@ def _CommonChecks(input_api, output_api): ...@@ -21,6 +38,7 @@ def _CommonChecks(input_api, output_api):
input_api.Command(name='mb_validate', input_api.Command(name='mb_validate',
cmd=cmd, kwargs=kwargs, cmd=cmd, kwargs=kwargs,
message=output_api.PresubmitError)])) message=output_api.PresubmitError)]))
results.extend(EnforceProductionFreeze(input_api, output_api))
return results return results
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment