Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitPoller misses changes when buildbot reconfigured #7527

Closed
doliver-pulsemining opened this issue Apr 22, 2024 · 0 comments
Closed

GitPoller misses changes when buildbot reconfigured #7527

doliver-pulsemining opened this issue Apr 22, 2024 · 0 comments

Comments

@doliver-pulsemining
Copy link

doliver-pulsemining commented Apr 22, 2024

Our buildbot configuration builds every git commit on select branches using the SingleBranchScheduler. We regularly add or remove branches to be built and reload the config with buildbot reconfig.

I've been investigating a few commits that did not trigger a build in our setup. I found that when buildbot is reconfigured to pick up config changes it ignores any commit between the last poll before the reconfig and the first poll after the reconfig.
The commit does trigger a build if buildbot is restarted.

It appears this is caused by the line self.lastRev = {}.
When buildbot is restarted the activate method loads lastRev from the database self.lastRev = yield self.getState('lastRev', {})
I think that the reconfigService method should also call getState to load the correct lastRev from the database.

Buildbot Version: 3.11.1
Operating System: RHEL9

tdesveaux added a commit to tdesveaux/buildbot that referenced this issue May 2, 2024
- renamed `lastRev` to `last_rev`.
- `last_rev` is now a variable of `GitPoller.poll` method.
- `last_rev` is now always read from state at each poll.
- `GitPoller.activate` is no longer a deferred.
- Minor fix to error log in `GitPoller._process_changes`.
    When an error occured while retrieving a rev information (author/timestamp/...)
    the error log would log the new HEAD rev of the branch instead of the problematic rev.
- introduced TestGitPollerBase helpers `set_last_rev` and `assert_last_rev`.

Probable fix to buildbot#7527
tdesveaux added a commit to tdesveaux/buildbot that referenced this issue May 2, 2024
- renamed `lastRev` to `last_rev`.
- `last_rev` is now a variable of `GitPoller.poll` method.
- `last_rev` is now always read from state at each poll.
- `GitPoller.activate` is no longer a deferred.
- Minor fix to error log in `GitPoller._process_changes`.
    When an error occured while retrieving a rev information (author/timestamp/...)
    the error log would log the new HEAD rev of the branch instead of the problematic rev.
- introduced TestGitPollerBase helpers `set_last_rev` and `assert_last_rev`.

Probable fix to buildbot#7527
tdesveaux added a commit to tdesveaux/buildbot that referenced this issue May 5, 2024
- renamed `lastRev` to `last_rev`.
- `last_rev` is now a variable of `GitPoller.poll` method.
- `last_rev` is now always read from state at each poll.
- `GitPoller.activate` is no longer a deferred.
- Minor fix to error log in `GitPoller._process_changes`.
    When an error occured while retrieving a rev information (author/timestamp/...)
    the error log would log the new HEAD rev of the branch instead of the problematic rev.
- introduced TestGitPollerBase helpers `set_last_rev` and `assert_last_rev`.

Probable fix to buildbot#7527
tdesveaux added a commit to tdesveaux/buildbot that referenced this issue May 5, 2024
- renamed `lastRev` to `last_rev`.
- `last_rev` is now a variable of `GitPoller.poll` method.
- `last_rev` is now always read from state at each poll.
- `GitPoller.activate` is no longer a deferred.
- Minor fix to error log in `GitPoller._process_changes`.
    When an error occured while retrieving a rev information (author/timestamp/...)
    the error log would log the new HEAD rev of the branch instead of the problematic rev.
- introduced TestGitPollerBase helpers `set_last_rev` and `assert_last_rev`.

Probable fix to buildbot#7527
@p12tic p12tic closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants