Ticket #353 (closed defect: fixed)
Missing "got_revision" property ends up with value of 'None' instead of None
| Reported by: | exarkun | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.7.10 |
| Version: | 0.7.8 | Keywords: | |
| Cc: |
Description
buildbot/slave/commands.py, SourceBase._handleGotRevision unconditionally sends a status update for got_revision. The value may be None. This ends up in the command's updates dict on the server. buildbot/steps/source.py, Source.commandComplete checks to see if got_revision is in the updates dict. If so, it passes the last value to str (turning None into "None") and sets the value as the "got_revision" property. This confounds any other code that expects to see None if there was no got_revision property. In other words, builder.getProperty returns "None" where it should return None. This has a side effect of persisting bogus data as well, the fix for which I'm not entirely clear on.
Change History
comment:2 Changed 4 years ago by dustin
This was introduced in #208. In general, revisions are treated as opaque strings by Buildbot, so I'm not going to cast them back to int. However, the str-ification of None doesn't make a lot of sense.
comment:3 Changed 4 years ago by dustin
- Milestone changed from undecided to 0.7.10
commit 5d057803fd13cc4e6bf43ae22347a355e2a9e611
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date: Sun Feb 15 20:54:10 2009 -0500
(fixes #353) revision and got_revision are strings; if no revision is gotten, don't set the property
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Oh. I suppose it is also worth mentioning that this isn't just a problem for properties with a value of None, that's just where it is causing problems with my buildbot so far. I'm also getting actual revision numbers converted to strings, whereas they used to be integers.