Buildbot proposal: add custom build properties for order and priority

Ryan Schmidt ryandesign at macports.org
Fri Mar 16 11:24:38 UTC 2018


On Mar 16, 2018, at 05:26, Mojca Miklavec wrote:

>> The property got called "priority" and right now the nextBuild function only looks at that, not the timestamp. This is fine, so long as portwatcher waits for all portbuilders to finish, as it currently does.
> 
> I semi-forgot about that. We should probably sort by timestamp first.
> The question now is how to read the timestamp :)

Instead, we might consider transforming "priority" from an integer into a "version number". I bet Python has a built-in version comparison we could use instead of our current numeric comparison operator.

So, instead of priority being "1", "2", "3", it would be "51462.1", "51462.2", "51462.3", where "51462" is the ID number of the portwatcher build that triggered these portbuilders. This has the advantage that we could in future add more components into the priority "version number" (such as a number for low, medium, high priority) without needing to further modify the code that determines which priority comes next.



More information about the macports-dev mailing list