Opened 5 years ago

Last modified 3 years ago

#2653 new task

Remove old scheduler methods

Reported by: dustin Owned by:
Priority: minor Milestone: 0.9.+
Version: Keywords: simple
Cc:

Description

Remove listBuilderNames and getPendingBuildTimes methods from BaseScheduler? when they are no longer used (so, after 0.9.0 is out)

Change History (4)

comment:1 in reply to: ↑ description Changed 3 years ago by MikeLing

Replying to dustin:

Remove listBuilderNames and getPendingBuildTimes methods from BaseScheduler? when they are no longer used (so, after 0.9.0 is out)

Hmm, I found we still need listBuilderNameshttps://github.com/buildbot/buildbot/search?utf8=%E2%9C%93&q=listBuilderNames and getPendingBuildTimes in a lot of placeshttps://github.com/buildbot/buildbot/search?utf8=%E2%9C%93&q=getPendingBuildTimes&type=Code. Should we remove they all?

comment:2 Changed 3 years ago by dustin

The only "real" use for listBuilderNames is in the configuration module, for error checking. Still, I think that makes sense, so we can keep it.

getPendingBuildTimes, however, is only used in tests, so it can go.

comment:3 Changed 3 years ago by MikeLing

comment:4 Changed 3 years ago by tardyp

0 % git grep getPendingBuildTimes
master/buildbot/schedulers/base.py:    def getPendingBuildTimes(self):
master/buildbot/schedulers/basic.py:    def getPendingBuildTimes(self):
master/buildbot/schedulers/timed.py:    def getPendingBuildTimes(self):
master/buildbot/test/unit/test_schedulers_base.py:    def test_getPendingBuildTimes(self):
master/buildbot/test/unit/test_schedulers_base.py:        self.assertEqual(sched.getPendingBuildTimes(), [])
master/buildbot/test/unit/test_schedulers_basic.py:            self.assertEqual(sched.getPendingBuildTimes(), [10])
master/buildbot/test/unit/test_schedulers_basic.py:            self.assertEqual(sched.getPendingBuildTimes(), [])
master/buildbot/test/unit/test_schedulers_basic.py:        self.assertEqual(sched.getPendingBuildTimes(), [2229])
master/buildbot/test/unit/test_schedulers_basic.py:        self.assertEqual(sched.getPendingBuildTimes(), [2235])
master/buildbot/test/unit/test_schedulers_basic.py:        self.assertEqual(sched.getPendingBuildTimes(), [2241])
master/buildbot/test/unit/test_schedulers_basic.py:        self.assertEqual(sched.getPendingBuildTimes(), [])
master/buildbot/test/unit/test_schedulers_basic.py:                      self.assertEqual(sched.getPendingBuildTimes(), [10]))
master/buildbot/test/unit/test_schedulers_basic.py:                      self.assertEqual(sched.getPendingBuildTimes(), [11]))
master/buildbot/test/unit/test_schedulers_basic.py:                      self.assertEqual(sorted(sched.getPendingBuildTimes()), [11, 15]))
master/buildbot/test/unit/test_schedulers_timed_Periodic.py:    def test_getPendingBuildTimes(self):
master/buildbot/test/unit/test_schedulers_timed_Periodic.py:        self.assertEqual(sched.getPendingBuildTimes(), [3.0])
master/buildbot/test/unit/test_schedulers_timed_Timed.py:    def test_getPendingBuildTimes(self):
master/buildbot/test/unit/test_schedulers_timed_Timed.py:        self.assertEqual(sched.getPendingBuildTimes(), [1060])
master/buildbot/test/unit/test_schedulers_timed_Timed.py:        self.assertEqual(sched.getPendingBuildTimes(), [1120])
Last edited 3 years ago by tardyp (previous) (diff)
Note: See TracTickets for help on using tickets.