Commit 5830d50
committed
Use claimed time for obsolete request cutoff
CancelOlderSameBranchRequests previously used the current buildset submitted_at as the cutoff for deciding which matching buildrequests were older. That is too early for tarball-docker: the newer tarball buildrequest may be queued while the previous tarball is still finishing and triggering downstream buildsets. Those downstream requests can then be submitted after the newer tarball request was queued, so only the subset submitted before that queued timestamp gets cancelled.
Use the current buildrequest claimed_at instead. By the time tarball-docker is running this step, Buildbot has already claimed the buildrequest to create/run the build, so claimed_at is expected to be present and marks the point where the newer tarball actually started being handled by a master.
For candidates, use br.get('submitted_at') from the buildrequest data returned by the /buildrequests query. Buildbot exposes buildrequest claimed_at and submitted_at as the same DateTime type, while buildset submitted_at is converted to an integer epoch value by the buildsets data API. Comparing buildrequest timestamps avoids extra type conversion and avoids mixing the two API representations. The buildset lookup remains only for sourcestamps used by the branch/repository/codebase/revision match.1 parent 78d1768 commit 5830d50
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
| 1004 | + | |
1004 | 1005 | | |
1005 | 1006 | | |
1006 | 1007 | | |
1007 | 1008 | | |
1008 | 1009 | | |
1009 | 1010 | | |
1010 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1011 | 1016 | | |
1012 | 1017 | | |
1013 | | - | |
| 1018 | + | |
| 1019 | + | |
1014 | 1020 | | |
1015 | 1021 | | |
1016 | 1022 | | |
| |||
1046 | 1052 | | |
1047 | 1053 | | |
1048 | 1054 | | |
| 1055 | + | |
1049 | 1056 | | |
1050 | 1057 | | |
1051 | 1058 | | |
| |||
1072 | 1079 | | |
1073 | 1080 | | |
1074 | 1081 | | |
1075 | | - | |
| 1082 | + | |
1076 | 1083 | | |
1077 | 1084 | | |
1078 | 1085 | | |
1079 | 1086 | | |
1080 | 1087 | | |
1081 | | - | |
1082 | | - | |
| 1088 | + | |
| 1089 | + | |
1083 | 1090 | | |
1084 | 1091 | | |
1085 | 1092 | | |
| |||
0 commit comments