
from buildbot.changes.pb import PBChangeSource

def Update(config, active_master, c):
  # Polls config.Master.trunk_url for changes
  c['change_source'].append(PBChangeSource())


from master.url_poller import URLPoller


LKGR_URL = 'https://chromium-status.appspot.com/lkgr'

def Update(config, active_master, c):
  c['change_source'].append(
      URLPoller(changeurl=LKGR_URL, pollInterval=300,
                category='lkgr', include_revision=True))

Switch master.chromium.lkgr to poll the chromium-status app.
Switch master.chromium.lkgr to poll the chromium-status app.

Using a PBChangeSource is silly, opaque, and potentially dangerous. We already
have a URLPoller for exactly this use-case (already in use by chromium.endure)
so let's use it here too. This also has the advantage of making sure
the LKGR waterfall picks up *all* updates to LKGR, including manual ones.

R=iannucci@chromium.org, phajdan.jr@chromium.org
BUG=366954

Review URL: https://codereview.chromium.org/255753002

git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@266093 0039d316-1c4b-4281-b951-d872f2087c98

  
- from buildbot.changes.pb import PBChangeSource
+ from master.url_poller import URLPoller
+ 
+ 
+ LKGR_URL = 'https://chromium-status.appspot.com/lkgr'
  
  def Update(config, active_master, c):
-   # Polls config.Master.trunk_url for changes
-   c['change_source'].append(PBChangeSource())
+   c['change_source'].append(
+       URLPoller(changeurl=LKGR_URL, pollInterval=300,
+                 category='lkgr', include_revision=True))
  
Switch master.chromium.lkgr to poll the chromium-status app.
## Code Before:

from buildbot.changes.pb import PBChangeSource

def Update(config, active_master, c):
  # Polls config.Master.trunk_url for changes
  c['change_source'].append(PBChangeSource())

## Instruction:
Switch master.chromium.lkgr to poll the chromium-status app.
## Code After:

from master.url_poller import URLPoller


LKGR_URL = 'https://chromium-status.appspot.com/lkgr'

def Update(config, active_master, c):
  c['change_source'].append(
      URLPoller(changeurl=LKGR_URL, pollInterval=300,
                category='lkgr', include_revision=True))
