Skip to content

Commit

Permalink
[M108] Update the code freeze presubmit dates for 2022
Browse files Browse the repository at this point in the history
(cherry picked from commit 7f45a30)

Bug: 1399615
Change-Id: Iaf518759f72da2f39e83d0c85c20f4ac6dc8f66b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4090110
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1081840}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4097117
Cr-Commit-Position: refs/branch-heads/5359@{#1187}
Cr-Branched-From: 27d3765-refs/heads/main@{#1058933}
  • Loading branch information
Struan Shrimpton authored and Chromium LUCI CQ committed Dec 12, 2022
1 parent cc6835f commit cdd14be
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
4 changes: 2 additions & 2 deletions infra/config/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

# The time module's handling of timezones is abysmal, so the boundaries are
# precomputed in UNIX time
_FREEZE_START = 1639641600 # 2021/12/16 00:00 -0800
_FREEZE_END = 1641196800 # 2022/01/03 00:00 -0800
_FREEZE_START = 1671177600 # 2022/12/16 00:00 -0800
_FREEZE_END = 1672646400 # 2023/01/02 00:00 -0800


def CheckFreeze(input_api, output_api):
Expand Down
13 changes: 6 additions & 7 deletions infra/config/PRESUBMIT_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ class FakeOutputApi:
return FakeOutputApi

def test_before_freeze(self):
input_api = self.get_input_api(1639641599) # 2021/12/15 23:59:59 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_START - 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)

self.assertEqual(errors, [])

def test_start_of_freeze(self):
input_api = self.get_input_api(1639641600) # 2021/12/16 00:00:00 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_START + 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand All @@ -73,7 +73,7 @@ def test_start_of_freeze(self):
errors[0].message.startswith('There is a prod freeze in effect'))

def test_end_of_freeze(self):
input_api = self.get_input_api(1641196799) # 2022/01/02 23:59:59 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_END - 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand All @@ -83,17 +83,16 @@ def test_end_of_freeze(self):
errors[0].message.startswith('There is a prod freeze in effect'))

def test_after_freeze(self):
input_api = self.get_input_api(1641196800) # 2022/01/03 00:00:00 -0800')
input_api = self.get_input_api(PRESUBMIT._FREEZE_END + 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)

self.assertEqual(errors, [])

def test_ignore_freeze(self):
input_api = self.get_input_api(
1639641600, # 2021/12/16 00:00:00 -0800
footers={'Ignore-Freeze': 'testing'})
input_api = self.get_input_api(PRESUBMIT._FREEZE_START + 1,
footers={'Ignore-Freeze': 'testing'})
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand Down
4 changes: 2 additions & 2 deletions testing/buildbot/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

# The time module's handling of timezones is abysmal, so the boundaries are
# precomputed in UNIX time
_FREEZE_START = 1639641600 # 2021/12/16 00:00 -0800
_FREEZE_END = 1641196800 # 2022/01/03 00:00 -0800
_FREEZE_START = 1671177600 # 2022/12/16 00:00 -0800
_FREEZE_END = 1672646400 # 2023/01/02 00:00 -0800


def CheckFreeze(input_api, output_api):
Expand Down
13 changes: 6 additions & 7 deletions testing/buildbot/PRESUBMIT_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ class FakeOutputApi:
return FakeOutputApi

def test_before_freeze(self):
input_api = self.get_input_api(1639641599) # 2021/12/15 23:59:59 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_START - 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)

self.assertEqual(errors, [])

def test_start_of_freeze(self):
input_api = self.get_input_api(1639641600) # 2021/12/16 00:00:00 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_START + 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand All @@ -77,7 +77,7 @@ def test_start_of_freeze(self):
errors[0].message.startswith('There is a prod freeze in effect'))

def test_end_of_freeze(self):
input_api = self.get_input_api(1641196799) # 2022/01/02 23:59:59 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_END - 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand All @@ -87,17 +87,16 @@ def test_end_of_freeze(self):
errors[0].message.startswith('There is a prod freeze in effect'))

def test_after_freeze(self):
input_api = self.get_input_api(1641196800) # 2022/01/03 00:00:00 -0800')
input_api = self.get_input_api(PRESUBMIT._FREEZE_END + 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)

self.assertEqual(errors, [])

def test_ignore_freeze(self):
input_api = self.get_input_api(
1639641600, # 2021/12/16 00:00:00 -0800
footers={'Ignore-Freeze': 'testing'})
input_api = self.get_input_api(PRESUBMIT._FREEZE_START + 1,
footers={'Ignore-Freeze': 'testing'})
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand Down
4 changes: 2 additions & 2 deletions tools/mb/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

# The time module's handling of timezones is abysmal, so the boundaries are
# precomputed in UNIX time
_FREEZE_START = 1639641600 # 2021/12/16 00:00 -0800
_FREEZE_END = 1641196800 # 2022/01/03 00:00 -0800
_FREEZE_START = 1671177600 # 2022/12/16 00:00 -0800
_FREEZE_END = 1672646400 # 2023/01/02 00:00 -0800


def CheckFreeze(input_api, output_api):
Expand Down
13 changes: 6 additions & 7 deletions tools/mb/PRESUBMIT_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ class FakeOutputApi:
return FakeOutputApi

def test_before_freeze(self):
input_api = self.get_input_api(1639641599) # 2021/12/15 23:59:59 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_START - 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)

self.assertEqual(errors, [])

def test_start_of_freeze(self):
input_api = self.get_input_api(1639641600) # 2021/12/16 00:00:00 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_START + 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand All @@ -73,7 +73,7 @@ def test_start_of_freeze(self):
errors[0].message.startswith('There is a prod freeze in effect'))

def test_end_of_freeze(self):
input_api = self.get_input_api(1641196799) # 2022/01/02 23:59:59 -0800
input_api = self.get_input_api(PRESUBMIT._FREEZE_END - 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand All @@ -83,17 +83,16 @@ def test_end_of_freeze(self):
errors[0].message.startswith('There is a prod freeze in effect'))

def test_after_freeze(self):
input_api = self.get_input_api(1641196800) # 2022/01/03 00:00:00 -0800')
input_api = self.get_input_api(PRESUBMIT._FREEZE_END + 1)
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)

self.assertEqual(errors, [])

def test_ignore_freeze(self):
input_api = self.get_input_api(
1639641600, # 2021/12/16 00:00:00 -0800
footers={'Ignore-Freeze': 'testing'})
input_api = self.get_input_api(PRESUBMIT._FREEZE_START + 1,
footers={'Ignore-Freeze': 'testing'})
output_api = self.get_output_api()

errors = PRESUBMIT.CheckFreeze(input_api, output_api)
Expand Down

0 comments on commit cdd14be

Please sign in to comment.