Ticket #817 (closed defect: fixed)
change manager ignores changeHorizon
| Reported by: | dustin | Owned by: | dustin |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.2 |
| Version: | 0.8.0 | Keywords: | database |
| Cc: |
Description
The change-pruning code is commented out. What are the consequences of pruning changes in the DB?
Change History
comment:2 Changed 3 years ago by dustin
- Owner set to catlee
- Status changed from new to assigned
We need to answer this in 0.8.2. Catlee?
comment:3 Changed 3 years ago by catlee
- Status changed from assigned to closed
- Resolution set to fixed
comment:4 Changed 3 years ago by catlee
- Status changed from closed to reopened
- Resolution fixed deleted
comment:6 Changed 3 years ago by catlee
First naive approach (just deleting changes older than changeHorizon) causes at least the web status to blow up:
data = self.content(request, ctx) File "/home/catlee/src/buildbot/master/buildbot/status/web/builder.py", line 66, in content source = pb.getSourceStamp() File "/home/catlee/src/buildbot/master/buildbot/status/builder.py", line 751, in getSourceStamp br = self.db.getBuildRequestWithNumber(self.brid) File "/home/catlee/src/buildbot/master/buildbot/db/connector.py", line 762, in getBuildRequestWithNumber brid) File "/home/catlee/src/buildbot/master/buildbot/db/connector.py", line 212, in runInteractionNow return self._runInteractionNow(interaction, *args, **kwargs) File "/home/catlee/src/buildbot/master/buildbot/db/connector.py", line 237, in _runInteractionNow result = interaction(c, *args, **kwargs) File "/home/catlee/src/buildbot/master/buildbot/db/connector.py", line 776, in _txn_getBuildRequestWithNumber ss = self.getSourceStampNumberedNow(ssid, t) File "/home/catlee/src/buildbot/master/buildbot/db/connector.py", line 509, in getSourceStampNumberedNow ss = self._txn_getSourceStampNumbered(t, ssid) File "/home/catlee/src/buildbot/master/buildbot/db/connector.py", line 551, in _txn_getSourceStampNumbered ss = SourceStamp(branch, revision, patch, changes, project=project, repository=repository) File "/home/catlee/src/buildbot/master/buildbot/sourcestamp.py", line 54, in __init__ self.branch = changes[-1].branch exceptions.AttributeError: 'NoneType' object has no attribute 'branch'
comment:7 Changed 3 years ago by dustin
I think you'll just need to delete sourcestamp_changes too, right? Let me put a patch together and see what you think.
comment:9 Changed 3 years ago by catlee
I think we need to be careful that the sourcestamp isn't referenced by any active builds.
comment:10 Changed 3 years ago by dustin
Why? This doesn't delete the sourcestamp, just its changes -- it becomes a change-less sourcestamp after that, which is a perfectly normal state. Did I miss something?
comment:11 Changed 3 years ago by dustin
catlee -- any further thoughts on this issue?
comment:12 Changed 3 years ago by dustin
- Status changed from assigned to closed
- Resolution set to fixed
commit 294a81c86198e8f105bb0eff1532193ef557ee0e
Merge: c7b3530 a77debe
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date: Mon Sep 6 21:17:39 2010 -0500
Merge branch 'bug817'
* bug817:
implement the changeHorizon
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)