buildbot icon indicating copy to clipboard operation
buildbot copied to clipboard

GitPoller is silently ignored

Open lms-jk opened this issue 2 years ago • 0 comments

Hi, I stumbled over a bug where GitPollers are silently ignored when two or more are configured with the same repourl.

In the following simplified example, only the second poller will "survive". The logs contain no warning or error message:

config['change_source'].append(
		changes.GitPoller(
			project='a',
			repourl='https://github.com/buildbot/buildbot.git',
			branches='3.4.x',
			pollinterval=60
		)
	)
config['change_source'].append(
		changes.GitPoller(
			project='b',
			repourl='https://github.com/buildbot/buildbot.git',
			branches='3.6.x',
			pollinterval=60
		)
	)

Potential explanation: If no GitPoller name is provided, it is implicitly set to the repourl in the GitPoller class. During reconfiguration the BuildbotServiceManager class converts the configuration list to a dictionary. Since dictionary elements are unique, the second GitPoller overwrites the first one.

There are two quick workarounds that came to my mind:

  • explicitly setting the GitPoller name (confirmed working)
  • or converting the list of GitPoller configurations to a dictionary

Ideas for potential fixes:

Cheers, Jan

lms-jk avatar Jul 24 '23 10:07 lms-jk