From povilas at radix.lt Fri Jul 1 09:40:39 2022 From: povilas at radix.lt (Povilas Kanapickas) Date: Fri, 1 Jul 2022 12:40:39 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Hi Vlad, You could setup a number of master locks that are each assigned to a particular physical machine. Then you can setup renderable locks for builds: a build would look into what physical machine it's about to launch on and select the correct lock. If the physical machine is oversubscribed, Buildbot will notice that lock can not be acquired look for another worker for the build. Regards, Povilas On 2022-06-28 12:44, Vlad Bogolin wrote: > Hello, > > We are using buildbot with primary DockerLatentWorkers for our CI. So, > given a physical machine, we have several DockerLatentWorkers that may > run on it. While this works well, in some cases buildbot starts too many > latent workers on the same machine. Is there a way to limit starting > builds for a particular DockerLatentWorker if others are already running > on the same machine? > > I feel like this should be achievable using the canStartBuild, but I am > unsure how. Is it possible to access the full list of defined latent > workers and see if one is on or not in the canStartBuild function? > > Thank you! > Vlad Bogolin > > _______________________________________________ > users mailing list > users at buildbot.net > https://lists.buildbot.net/mailman/listinfo/users > From vlad at mariadb.org Mon Jul 4 18:39:09 2022 From: vlad at mariadb.org (Vlad Bogolin) Date: Mon, 4 Jul 2022 21:39:09 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Hi, Thank you for your reply! Is there any way to customize what oversubscribed means? We already use a locking mechanism, but still this translates into having multiple running builds that just wait for the locks for several hours. Ideally, I would like to avoid this. Also, by any chance, can you read a lock value from the canStartBuild function? Thank you! Vlad Bogolin On Fri, Jul 1, 2022 at 12:40 PM Povilas Kanapickas wrote: > Hi Vlad, > > You could setup a number of master locks that are each assigned to a > particular physical machine. Then you can setup renderable locks for > builds: a build would look into what physical machine it's about to > launch on and select the correct lock. If the physical machine is > oversubscribed, Buildbot will notice that lock can not be acquired look > for another worker for the build. > > Regards, > Povilas > > On 2022-06-28 12:44, Vlad Bogolin wrote: > > Hello, > > > > We are using buildbot with primary DockerLatentWorkers for our CI. So, > > given a physical machine, we have several DockerLatentWorkers that may > > run on it. While this works well, in some cases buildbot starts too many > > latent workers on the same machine. Is there a way to limit starting > > builds for a particular DockerLatentWorker if others are already running > > on the same machine? > > > > I feel like this should be achievable using the canStartBuild, but I am > > unsure how. Is it possible to access the full list of defined latent > > workers and see if one is on or not in the canStartBuild function? > > > > Thank you! > > Vlad Bogolin > > > > _______________________________________________ > > users mailing list > > users at buildbot.net > > https://lists.buildbot.net/mailman/listinfo/users > > > -- Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From povilas at radix.lt Mon Jul 4 18:52:39 2022 From: povilas at radix.lt (Povilas Kanapickas) Date: Mon, 4 Jul 2022 21:52:39 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Hi, If you use renderable *builder* locks then they will not cause builds to wait for the locks. The builder lock resolution happens before the build actually starts, even before the canStartBuild function. Starting a build that later can't acquire the builder locks we just checked should be rare occurrence. If that's not the case, it's a bug I would be interested in investigating. So what I would do is to set builder locks argument to a renderable function, within that function I would check interesting build properties such as which worker the build is about to start on and then return a set of locks that must be acquired. This way you would have almost complete flexibility. For each resource you can have separate master lock with maxCount representing maximum resource utilization (e.g. 512GB RAM or whatever) and then the builders would take e.g. lock.access('counting', count=8) to acquire a 8GB ram slice). Regards, Povilas On 2022-07-04 21:39, Vlad Bogolin wrote: > Hi, > > Thank you?for your reply! Is there any way to customize what > oversubscribed means? We already use a locking mechanism, but still this > translates into having multiple running builds?that just wait for the > locks for several hours. Ideally, I would like to avoid this. > > Also, by any chance, can you read a lock value from the canStartBuild > function? > > Thank you! > Vlad Bogolin? > > On Fri, Jul 1, 2022 at 12:40 PM Povilas Kanapickas > wrote: > > Hi Vlad, > > You could setup a number of master locks that are each assigned to a > particular physical machine. Then you can setup renderable locks for > builds: a build would look into what physical machine it's about to > launch on and select the correct lock. If the physical machine is > oversubscribed, Buildbot will notice that lock can not be acquired look > for another worker for the build. > > Regards, > Povilas > > On 2022-06-28 12:44, Vlad Bogolin wrote: > > Hello, > > > > We are using buildbot with primary DockerLatentWorkers for our CI. So, > > given a physical machine, we have several DockerLatentWorkers that may > > run on it. While this works well, in some cases buildbot starts > too many > > latent workers on the same machine. Is there a way to limit starting > > builds for a particular DockerLatentWorker if others are already > running > > on the same machine? > > > > I feel like this should be achievable using the canStartBuild, but > I am > > unsure how. Is it possible to access the full list of defined latent > > workers and see if one is on or not in the canStartBuild function? > > > > Thank you! > > Vlad Bogolin > > > > _______________________________________________ > > users mailing list > > users at buildbot.net > > https://lists.buildbot.net/mailman/listinfo/users > > > > > > > -- > Vlad From vlad at mariadb.org Mon Jul 4 19:05:48 2022 From: vlad at mariadb.org (Vlad Bogolin) Date: Mon, 4 Jul 2022 22:05:48 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Thanks for the prompt reply! Our locks are defined as you can see here https://github.com/MariaDB/buildbot/blob/main/locks.py and then each build receives as argument the lock function https://github.com/MariaDB/buildbot/blob/cd5378a7b6549e3bf5930306c2eed29239aa3a38/master.cfg#L961. However, for example this build ( https://buildbot.mariadb.org/#/builders/348/builds/1638) is now waiting for 6h to acquire the locks. Overall there are 11 builds that have started and are waiting for locks currently. I have considered this to be normal, but if you think there is an issue please let me know. Thank you! On Mon, Jul 4, 2022 at 9:52 PM Povilas Kanapickas wrote: > Hi, > > If you use renderable *builder* locks then they will not cause builds to > wait for the locks. The builder lock resolution happens before the build > actually starts, even before the canStartBuild function. > > Starting a build that later can't acquire the builder locks we just > checked should be rare occurrence. If that's not the case, it's a bug I > would be interested in investigating. > > So what I would do is to set builder locks argument to a renderable > function, within that function I would check interesting build > properties such as which worker the build is about to start on and then > return a set of locks that must be acquired. This way you would have > almost complete flexibility. For each resource you can have separate > master lock with maxCount representing maximum resource utilization > (e.g. 512GB RAM or whatever) and then the builders would take e.g. > lock.access('counting', count=8) to acquire a 8GB ram slice). > > Regards, > Povilas > > On 2022-07-04 21:39, Vlad Bogolin wrote: > > Hi, > > > > Thank you for your reply! Is there any way to customize what > > oversubscribed means? We already use a locking mechanism, but still this > > translates into having multiple running builds that just wait for the > > locks for several hours. Ideally, I would like to avoid this. > > > > Also, by any chance, can you read a lock value from the canStartBuild > > function? > > > > Thank you! > > Vlad Bogolin > > > > On Fri, Jul 1, 2022 at 12:40 PM Povilas Kanapickas > > wrote: > > > > Hi Vlad, > > > > You could setup a number of master locks that are each assigned to a > > particular physical machine. Then you can setup renderable locks for > > builds: a build would look into what physical machine it's about to > > launch on and select the correct lock. If the physical machine is > > oversubscribed, Buildbot will notice that lock can not be acquired > look > > for another worker for the build. > > > > Regards, > > Povilas > > > > On 2022-06-28 12:44, Vlad Bogolin wrote: > > > Hello, > > > > > > We are using buildbot with primary DockerLatentWorkers for our CI. > So, > > > given a physical machine, we have several DockerLatentWorkers that > may > > > run on it. While this works well, in some cases buildbot starts > > too many > > > latent workers on the same machine. Is there a way to limit > starting > > > builds for a particular DockerLatentWorker if others are already > > running > > > on the same machine? > > > > > > I feel like this should be achievable using the canStartBuild, but > > I am > > > unsure how. Is it possible to access the full list of defined > latent > > > workers and see if one is on or not in the canStartBuild function? > > > > > > Thank you! > > > Vlad Bogolin > > > > > > _______________________________________________ > > > users mailing list > > > users at buildbot.net > > > https://lists.buildbot.net/mailman/listinfo/users > > > > > > > > > > > > > -- > > Vlad > -- Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From povilas at radix.lt Mon Jul 4 19:18:13 2022 From: povilas at radix.lt (Povilas Kanapickas) Date: Mon, 4 Jul 2022 22:18:13 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Your setup is exactly what I described and should work (at least in theory). I will look into this when I have time. On 2022-07-04 22:05, Vlad Bogolin wrote: > Thanks for the prompt reply!? > > Our locks are defined as you can see > here?https://github.com/MariaDB/buildbot/blob/main/locks.py > and then each > build receives as argument the lock > function?https://github.com/MariaDB/buildbot/blob/cd5378a7b6549e3bf5930306c2eed29239aa3a38/master.cfg#L961 > . > However, for example this build > (https://buildbot.mariadb.org/#/builders/348/builds/1638 > ) is now > waiting for 6h to acquire the locks. Overall there are 11 builds that > have started and are waiting for locks currently. I have considered this > to be normal, but if you think there is an issue please let me know. > > Thank you! > > On Mon, Jul 4, 2022 at 9:52 PM Povilas Kanapickas > wrote: > > Hi, > > If you use renderable *builder* locks then they will not cause builds to > wait for the locks. The builder lock resolution happens before the build > actually starts, even before the canStartBuild function. > > Starting a build that later can't acquire the builder locks we just > checked should be rare occurrence. If that's not the case, it's a bug I > would be interested in investigating. > > So what I would do is to set builder locks argument to a renderable > function, within that function I would check interesting build > properties such as which worker the build is about to start on and then > return a set of locks that must be acquired. This way you would have > almost complete flexibility. For each resource you can have separate > master lock with maxCount representing maximum resource utilization > (e.g. 512GB RAM or whatever) and then the builders would take e.g. > lock.access('counting', count=8) to acquire a 8GB ram slice). > > Regards, > Povilas > > On 2022-07-04 21:39, Vlad Bogolin wrote: > > Hi, > > > > Thank you?for your reply! Is there any way to customize what > > oversubscribed means? We already use a locking mechanism, but > still this > > translates into having multiple running builds?that just wait for the > > locks for several hours. Ideally, I would like to avoid this. > > > > Also, by any chance, can you read a lock value from the canStartBuild > > function? > > > > Thank you! > > Vlad Bogolin? > > > > On Fri, Jul 1, 2022 at 12:40 PM Povilas Kanapickas > > > >> wrote: > > > >? ? ?Hi Vlad, > > > >? ? ?You could setup a number of master locks that are each > assigned to a > >? ? ?particular physical machine. Then you can setup renderable > locks for > >? ? ?builds: a build would look into what physical machine it's > about to > >? ? ?launch on and select the correct lock. If the physical machine is > >? ? ?oversubscribed, Buildbot will notice that lock can not be > acquired look > >? ? ?for another worker for the build. > > > >? ? ?Regards, > >? ? ?Povilas > > > >? ? ?On 2022-06-28 12:44, Vlad Bogolin wrote: > >? ? ?> Hello, > >? ? ?> > >? ? ?> We are using buildbot with primary DockerLatentWorkers for > our CI. So, > >? ? ?> given a physical machine, we have several > DockerLatentWorkers that may > >? ? ?> run on it. While this works well, in some cases buildbot starts > >? ? ?too many > >? ? ?> latent workers on the same machine. Is there a way to limit > starting > >? ? ?> builds for a particular DockerLatentWorker if others are already > >? ? ?running > >? ? ?> on the same machine? > >? ? ?> > >? ? ?> I feel like this should be achievable using the > canStartBuild, but > >? ? ?I am > >? ? ?> unsure how. Is it possible to access the full list of > defined latent > >? ? ?> workers and see if one is on or not in the canStartBuild > function? > >? ? ?> > >? ? ?> Thank you! > >? ? ?> Vlad Bogolin > >? ? ?> > >? ? ?> _______________________________________________ > >? ? ?> users mailing list > >? ? ?> users at buildbot.net > > > >? ? ?> https://lists.buildbot.net/mailman/listinfo/users > > >? ? ? > > >? ? ?> > > > > > > > > -- > > Vlad > > > > -- > Vlad From vlad at mariadb.org Mon Jul 4 19:20:21 2022 From: vlad at mariadb.org (Vlad Bogolin) Date: Mon, 4 Jul 2022 22:20:21 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Great, thanks! Please keep me posted! On Mon, Jul 4, 2022 at 10:18 PM Povilas Kanapickas wrote: > Your setup is exactly what I described and should work (at least in > theory). I will look into this when I have time. > > On 2022-07-04 22:05, Vlad Bogolin wrote: > > Thanks for the prompt reply! > > > > Our locks are defined as you can see > > here https://github.com/MariaDB/buildbot/blob/main/locks.py > > and then each > > build receives as argument the lock > > function > https://github.com/MariaDB/buildbot/blob/cd5378a7b6549e3bf5930306c2eed29239aa3a38/master.cfg#L961 > > < > https://github.com/MariaDB/buildbot/blob/cd5378a7b6549e3bf5930306c2eed29239aa3a38/master.cfg#L961 > >. > > However, for example this build > > (https://buildbot.mariadb.org/#/builders/348/builds/1638 > > ) is now > > waiting for 6h to acquire the locks. Overall there are 11 builds that > > have started and are waiting for locks currently. I have considered this > > to be normal, but if you think there is an issue please let me know. > > > > Thank you! > > > > On Mon, Jul 4, 2022 at 9:52 PM Povilas Kanapickas > > wrote: > > > > Hi, > > > > If you use renderable *builder* locks then they will not cause > builds to > > wait for the locks. The builder lock resolution happens before the > build > > actually starts, even before the canStartBuild function. > > > > Starting a build that later can't acquire the builder locks we just > > checked should be rare occurrence. If that's not the case, it's a > bug I > > would be interested in investigating. > > > > So what I would do is to set builder locks argument to a renderable > > function, within that function I would check interesting build > > properties such as which worker the build is about to start on and > then > > return a set of locks that must be acquired. This way you would have > > almost complete flexibility. For each resource you can have separate > > master lock with maxCount representing maximum resource utilization > > (e.g. 512GB RAM or whatever) and then the builders would take e.g. > > lock.access('counting', count=8) to acquire a 8GB ram slice). > > > > Regards, > > Povilas > > > > On 2022-07-04 21:39, Vlad Bogolin wrote: > > > Hi, > > > > > > Thank you for your reply! Is there any way to customize what > > > oversubscribed means? We already use a locking mechanism, but > > still this > > > translates into having multiple running builds that just wait for > the > > > locks for several hours. Ideally, I would like to avoid this. > > > > > > Also, by any chance, can you read a lock value from the > canStartBuild > > > function? > > > > > > Thank you! > > > Vlad Bogolin > > > > > > On Fri, Jul 1, 2022 at 12:40 PM Povilas Kanapickas > > > > > >> wrote: > > > > > > Hi Vlad, > > > > > > You could setup a number of master locks that are each > > assigned to a > > > particular physical machine. Then you can setup renderable > > locks for > > > builds: a build would look into what physical machine it's > > about to > > > launch on and select the correct lock. If the physical machine > is > > > oversubscribed, Buildbot will notice that lock can not be > > acquired look > > > for another worker for the build. > > > > > > Regards, > > > Povilas > > > > > > On 2022-06-28 12:44, Vlad Bogolin wrote: > > > > Hello, > > > > > > > > We are using buildbot with primary DockerLatentWorkers for > > our CI. So, > > > > given a physical machine, we have several > > DockerLatentWorkers that may > > > > run on it. While this works well, in some cases buildbot > starts > > > too many > > > > latent workers on the same machine. Is there a way to limit > > starting > > > > builds for a particular DockerLatentWorker if others are > already > > > running > > > > on the same machine? > > > > > > > > I feel like this should be achievable using the > > canStartBuild, but > > > I am > > > > unsure how. Is it possible to access the full list of > > defined latent > > > > workers and see if one is on or not in the canStartBuild > > function? > > > > > > > > Thank you! > > > > Vlad Bogolin > > > > > > > > _______________________________________________ > > > > users mailing list > > > > users at buildbot.net > > > > > > > https://lists.buildbot.net/mailman/listinfo/users > > > > > > > > > > > > > > > > > > > > > > > -- > > > Vlad > > > > > > > > -- > > Vlad > -- Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From vlad at mariadb.org Wed Jul 6 10:51:06 2022 From: vlad at mariadb.org (Vlad Bogolin) Date: Wed, 6 Jul 2022 13:51:06 +0300 Subject: [users@bb.net] Limit amount of DockerLatentWorkers running on a particular physical machine In-Reply-To: References: Message-ID: Hi, I have a follow up question: is it possible to use the locking mechanism in a multi-master setup? From my attempts it seems that each master process has its own locks. Do you have any suggestions on what we might use to limit the amount of DockerLatentWorkers that might run if they are shared among multiple master processes? Thank you! On Mon, Jul 4, 2022 at 10:20 PM Vlad Bogolin wrote: > Great, thanks! Please keep me posted! > > On Mon, Jul 4, 2022 at 10:18 PM Povilas Kanapickas > wrote: > >> Your setup is exactly what I described and should work (at least in >> theory). I will look into this when I have time. >> >> On 2022-07-04 22:05, Vlad Bogolin wrote: >> > Thanks for the prompt reply! >> > >> > Our locks are defined as you can see >> > here https://github.com/MariaDB/buildbot/blob/main/locks.py >> > and then each >> > build receives as argument the lock >> > function >> https://github.com/MariaDB/buildbot/blob/cd5378a7b6549e3bf5930306c2eed29239aa3a38/master.cfg#L961 >> > < >> https://github.com/MariaDB/buildbot/blob/cd5378a7b6549e3bf5930306c2eed29239aa3a38/master.cfg#L961 >> >. >> > However, for example this build >> > (https://buildbot.mariadb.org/#/builders/348/builds/1638 >> > ) is now >> > waiting for 6h to acquire the locks. Overall there are 11 builds that >> > have started and are waiting for locks currently. I have considered this >> > to be normal, but if you think there is an issue please let me know. >> > >> > Thank you! >> > >> > On Mon, Jul 4, 2022 at 9:52 PM Povilas Kanapickas > > > wrote: >> > >> > Hi, >> > >> > If you use renderable *builder* locks then they will not cause >> builds to >> > wait for the locks. The builder lock resolution happens before the >> build >> > actually starts, even before the canStartBuild function. >> > >> > Starting a build that later can't acquire the builder locks we just >> > checked should be rare occurrence. If that's not the case, it's a >> bug I >> > would be interested in investigating. >> > >> > So what I would do is to set builder locks argument to a renderable >> > function, within that function I would check interesting build >> > properties such as which worker the build is about to start on and >> then >> > return a set of locks that must be acquired. This way you would have >> > almost complete flexibility. For each resource you can have separate >> > master lock with maxCount representing maximum resource utilization >> > (e.g. 512GB RAM or whatever) and then the builders would take e.g. >> > lock.access('counting', count=8) to acquire a 8GB ram slice). >> > >> > Regards, >> > Povilas >> > >> > On 2022-07-04 21:39, Vlad Bogolin wrote: >> > > Hi, >> > > >> > > Thank you for your reply! Is there any way to customize what >> > > oversubscribed means? We already use a locking mechanism, but >> > still this >> > > translates into having multiple running builds that just wait for >> the >> > > locks for several hours. Ideally, I would like to avoid this. >> > > >> > > Also, by any chance, can you read a lock value from the >> canStartBuild >> > > function? >> > > >> > > Thank you! >> > > Vlad Bogolin >> > > >> > > On Fri, Jul 1, 2022 at 12:40 PM Povilas Kanapickas >> > >> > > >> wrote: >> > > >> > > Hi Vlad, >> > > >> > > You could setup a number of master locks that are each >> > assigned to a >> > > particular physical machine. Then you can setup renderable >> > locks for >> > > builds: a build would look into what physical machine it's >> > about to >> > > launch on and select the correct lock. If the physical >> machine is >> > > oversubscribed, Buildbot will notice that lock can not be >> > acquired look >> > > for another worker for the build. >> > > >> > > Regards, >> > > Povilas >> > > >> > > On 2022-06-28 12:44, Vlad Bogolin wrote: >> > > > Hello, >> > > > >> > > > We are using buildbot with primary DockerLatentWorkers for >> > our CI. So, >> > > > given a physical machine, we have several >> > DockerLatentWorkers that may >> > > > run on it. While this works well, in some cases buildbot >> starts >> > > too many >> > > > latent workers on the same machine. Is there a way to limit >> > starting >> > > > builds for a particular DockerLatentWorker if others are >> already >> > > running >> > > > on the same machine? >> > > > >> > > > I feel like this should be achievable using the >> > canStartBuild, but >> > > I am >> > > > unsure how. Is it possible to access the full list of >> > defined latent >> > > > workers and see if one is on or not in the canStartBuild >> > function? >> > > > >> > > > Thank you! >> > > > Vlad Bogolin >> > > > >> > > > _______________________________________________ >> > > > users mailing list >> > > > users at buildbot.net >> > > >> > > > https://lists.buildbot.net/mailman/listinfo/users >> > >> > > > > > >> > > > >> > > >> > > >> > > >> > > -- >> > > Vlad >> > >> > >> > >> > -- >> > Vlad >> > > > -- > Vlad > -- Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.sorby at auckland.ac.nz Tue Jul 12 09:13:32 2022 From: h.sorby at auckland.ac.nz (Hugh Sorby) Date: Tue, 12 Jul 2022 09:13:32 +0000 Subject: [users@bb.net] Get previous step build result Message-ID: I'm using Buildbot 3.5.0 and I would like to know if the previous step failed or succeeded. I have tried to use the doStepIf method to figure out the previous steps status, but I haven't been able to make this work. Is it possible to do this with 3.5.0? Many thanks for any suggestions/pointers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From roland at micite.net Wed Jul 13 12:36:54 2022 From: roland at micite.net (Roland van Laar) Date: Wed, 13 Jul 2022 14:36:54 +0200 Subject: [users@bb.net] Get previous step build result In-Reply-To: References: Message-ID: <3c97ea74-1dd0-dd85-c71b-50074612972e@micite.net> On 12-07-2022 11:13, Hugh Sorby wrote: > I'm using Buildbot 3.5.0 and I would like to know if the previous step > failed or succeeded. > I have tried to use the doStepIf method to figure out the previous > steps status, but I haven't been able to make this work. > > Is it possible to do this with 3.5.0? Hey, sorry can't give you a dry cut answer. I do have a few pointers for when we needed to fetch a previous build. Have a look at: `getPreviousBuild` from: https://github.com/buildbot/buildbot/blob/master/master/buildbot/reporters/utils.py Over at scummvm we use a custom reporter which compares the current build to the last one on master branch. Here is our vendorized `getPreviousBuild`: https://github.com/scummvm/scummvm-sites/blob/director-buildbot/director/vendor/reporter_utils.py Note: we're on 2.8.4 Regards, Roland > Many thanks for any suggestions/pointers. > > _______________________________________________ > users mailing list > users at buildbot.net > https://lists.buildbot.net/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.sorby at auckland.ac.nz Thu Jul 14 10:10:32 2022 From: h.sorby at auckland.ac.nz (Hugh Sorby) Date: Thu, 14 Jul 2022 10:10:32 +0000 Subject: [users@bb.net] Get previous step build result In-Reply-To: <3c97ea74-1dd0-dd85-c71b-50074612972e@micite.net> References: <3c97ea74-1dd0-dd85-c71b-50074612972e@micite.net> Message-ID: Thanks Roland for the pointer, I ended up with this @defer.inlineCallbacks def end_to_end_testing_succeeded(build_step): build_id = build_step.build.buildid master = build_step.build.master build_steps = yield master.data.get(("builds", build_id, 'steps')) for step in build_steps: if step['name'] == 'Trigger End-to-End Testing': return step['results'] == SUCCESS return False And applied it like this: doStepIf=end_to_end_testing_succeeded, Seems to work. ________________________________ From: users on behalf of Roland van Laar Sent: 14 July 2022 00:36 To: users at buildbot.net Subject: Re: [users at bb.net] Get previous step build result Caution - Forged External Domain! This e-mail cannot be validated and may not have been sent by the sender shown in the 'From' field. If you were not expecting to receive this e-mail we recommend you contact the sender to confirm that they sent it. If you believe this email was legitimately sent, we suggest the sender notify their e-mail administrator that it has been received as a forged (fake) e-mail by the University of Auckland. Please contact the Staff Service Centre on extension 86000 if you require further assistance. On 12-07-2022 11:13, Hugh Sorby wrote: I'm using Buildbot 3.5.0 and I would like to know if the previous step failed or succeeded. I have tried to use the doStepIf method to figure out the previous steps status, but I haven't been able to make this work. Is it possible to do this with 3.5.0? Hey, sorry can't give you a dry cut answer. I do have a few pointers for when we needed to fetch a previous build. Have a look at: `getPreviousBuild` from: https://github.com/buildbot/buildbot/blob/master/master/buildbot/reporters/utils.py Over at scummvm we use a custom reporter which compares the current build to the last one on master branch. Here is our vendorized `getPreviousBuild`: https://github.com/scummvm/scummvm-sites/blob/director-buildbot/director/vendor/reporter_utils.py Note: we're on 2.8.4 Regards, Roland Many thanks for any suggestions/pointers. _______________________________________________ users mailing list users at buildbot.net https://lists.buildbot.net/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: