Skip to content

Commit

Permalink
Remove ignored buildHorizon and logHorizion.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprince committed Jun 24, 2016
1 parent b78eb91 commit 9a5abd7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 34 deletions.
29 changes: 19 additions & 10 deletions master/buildbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ def __init__(self):
self.buildbotURL = 'http://localhost:8080/'
self.changeHorizon = None
self.eventHorizon = 50
self.logHorizon = None
self.buildHorizon = None
self.logCompressionLimit = 4 * 1024
self.logCompressionMethod = 'gz'
self.logEncoding = 'utf-8'
Expand Down Expand Up @@ -299,7 +297,6 @@ def loadFromDict(cls, config_dict, filename):
config.check_locks()
config.check_builders()
config.check_status()
config.check_horizons()
config.check_ports()
finally:
_errors = None
Expand Down Expand Up @@ -338,8 +335,13 @@ def copy_str_param(name, alt_key=None):

copy_int_param('changeHorizon')
copy_int_param('eventHorizon')
copy_int_param('logHorizon')
copy_int_param('buildHorizon')

if 'logHorizon' in config_dict:
warnDeprecated(
"0.9.0", "logHorizon is deprecated and will be ignored")
if 'buildHorizon' in config_dict:
warnDeprecated(
"0.9.0", "buildHorizon is deprecated and will be ignored")

copy_int_param('logCompressionLimit')

Expand Down Expand Up @@ -822,11 +824,6 @@ def check_status(self):
for s in self.status:
s.checkConfig(self.status)

def check_horizons(self):
if self.logHorizon is not None and self.buildHorizon is not None:
if self.logHorizon > self.buildHorizon:
error("logHorizon must be less than or equal to buildHorizon")

def check_ports(self):
ports = set()
if self.protocols:
Expand All @@ -849,6 +846,18 @@ def check_ports(self):
if self.workers:
error("workers are configured, but c['protocols'] not")

@property
def logHorizon(self):
warnDeprecated(
"0.9.0", "logHorizon is deprecated and will be ignored")
return None

@property
def buildHorizon(self):
warnDeprecated(
"0.9.0", "buildHorizon is deprecated and will be ignored")
return None


class BuilderConfig(util_config.ConfiguredMixin, WorkerAPICompatMixin):

Expand Down
16 changes: 0 additions & 16 deletions master/buildbot/test/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
buildbotURL='http://localhost:8080/',
changeHorizon=None,
eventHorizon=50,
logHorizon=None,
buildHorizon=None,
logCompressionLimit=4096,
logCompressionMethod='gz',
logEncoding='utf-8',
Expand Down Expand Up @@ -350,7 +348,6 @@ def test_loadConfig_success(self):
self.failUnless(rv.check_locks.called)
self.failUnless(rv.check_builders.called)
self.failUnless(rv.check_status.called)
self.failUnless(rv.check_horizons.called)
self.failUnless(rv.check_ports.called)

def test_preChangeGenerator(self):
Expand Down Expand Up @@ -462,12 +459,6 @@ def test_load_global_changeHorizon_none(self):
def test_load_global_eventHorizon(self):
self.do_test_load_global(dict(eventHorizon=10), eventHorizon=10)

def test_load_global_logHorizon(self):
self.do_test_load_global(dict(logHorizon=10), logHorizon=10)

def test_load_global_buildHorizon(self):
self.do_test_load_global(dict(buildHorizon=10), buildHorizon=10)

def test_load_global_logCompressionLimit(self):
self.do_test_load_global(dict(logCompressionLimit=10),
logCompressionLimit=10)
Expand Down Expand Up @@ -1199,13 +1190,6 @@ def test_check_status(self):
self.assertNoConfigErrors(self.errors)
st.checkConfig.assert_called_once_with(self.cfg.status)

def test_check_horizons(self):
self.cfg.logHorizon = 100
self.cfg.buildHorizon = 50
self.cfg.check_horizons()

self.assertConfigError(self.errors, "logHorizon must be less")

def test_check_ports_protocols_set(self):
self.cfg.protocols = {"pb": {"port": 10}}
self.cfg.check_ports()
Expand Down
8 changes: 0 additions & 8 deletions master/docs/developer/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ described in :ref:`developer-Reconfiguration`.
The current event horizon, from :bb:cfg:`eventHorizon`.

.. py:attribute:: logHorizon
The current log horizon, from :bb:cfg:`logHorizon`.

.. py:attribute:: buildHorizon
The current build horizon, from :bb:cfg:`buildHorizon`.

.. py:attribute:: logCompressionLimit
The current log compression limit, from :bb:cfg:`logCompressionLimit`.
Expand Down

0 comments on commit 9a5abd7

Please sign in to comment.