[Buildbot] #3101: exception while rendering logs
Buildbot trac
trac at buildbot.net
Tue Dec 9 22:08:49 UTC 2014
#3101: exception while rendering logs
-------------------+-----------------------
Reporter: sa2ajj | Owner: dustin
Type: defect | Status: assigned
Priority: major | Milestone: 0.9.0
Version: master | Resolution:
Keywords: web |
-------------------+-----------------------
Changes (by dustin):
* owner: => dustin
* status: new => assigned
Comment:
I wrote up a quick verification script:
{{{
#! python
import sqlalchemy as sa
db_url = "sqlite:////A/bbrun/state.sqlite"
def verify():
eng = sa.create_engine(db_url)
conn = eng.connect()
for log_row in conn.execute("select id, num_lines, type from logs"):
print "verifying log", log_row.id
assert log_row['type'] in 'sth'
line_ranges = []
for logchunk_row in conn.execute("select first_line, last_line,
content from logchunks where logid=%d" % log_row['id']):
content, first, last = logchunk_row['content'],
logchunk_row['first_line'], logchunk_row['last_line']
assert last >= first
assert str(content).count('\n') == last - first
line_ranges.append((logchunk_row['first_line'],
logchunk_row['last_line']))
next_line = 0
for f, l in sorted(line_ranges):
assert f == next_line
next_line = l + 1
assert log_row['num_lines'] == next_line
if __name__ == "__main__":
verify()
}}}
and all logs in the DB (including 1470 and 1488) pass without issue.
--
Ticket URL: <http://trac.buildbot.net/ticket/3101#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the bugs
mailing list