# Make Continua discard a build if when new build is queued

**URL:** <https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065>\
**Category:** Feature Requests\
**Created:** [September 16, 2013, 9:20am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065 "2013-09-16T09:20:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 16, 2013, 9:20am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/1 "2013-09-16T09:20:02Z")

</div>

Hi

We are trying to configure Continua so any unstarted but queued builds are discarded when a build is triggered because of new changes.

We though that the&nbsp; **$Build.HasNewChanges$** &nbsp;could be used, but it seems to discard all our builds.

Hope you can help.

Thank you,

Thomas

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [September 16, 2013, 9:26am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/2 "2013-09-16T09:26:53Z")

</div>

Hi Thomas   
  
 There’s no way to discard already queued builds (other than manually cancelling them). I’m not sure it would be feasable to implement such a feature, but I’ll add it to the todo list to investigate.   
  
 Perhaps a better solution would be to make use of the Quiet Period on the Trigger. When the build is queued, it will wait until the quiet period expires before starting the build. During the quiet period, any new changes that are found are added to the already queued build and the quiet period is restarted.

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 17, 2013, 8:44am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/3 "2013-09-17T08:44:48Z")

</div>

> Posted By [Vincent Parrett](https://www.finalbuilder.com/User-Profile/userid/5.aspx) on 16 Sep 2013 02:26 AM  
> Hi Thomas   
>   
> There's no way to discard already queued builds (other than manually cancelling them). I'm not sure it would be feasable to implement such a feature, but I'll add it to the todo list to investigate.   
>   
> Perhaps a better solution would be to make use of the Quiet Period on the Trigger. When the build is queued, it will wait until the quiet period expires before starting the build. During the quiet period, any new changes that are found are added to the already queued build and the quiet period is restarted.

  

Hi Vincent

From our point we get a build queued for every checkin, this is fine but if the next 2 checkin's are to the same solution while it is still building the first checkin or busy building other solutions. We dont want it to build both of the checkins only the last.

So we do not want it to wait before it queues the first build, there is no reason for this, we do not know if the next checkin will be in 1 or 10 min. But it makes alot sense (from our perspective) to discard any checkin triggered queued builds on the same solution. We quickly have a queue with many instances of the same solution.

Really what we are after is an option to only have one instance of each solution in the queue at a time. Sort of a "if (solution in queue) then _DONT add to queue_ else _add to queue_" behavior so we only requeue solutions if they are not about to be build.

Does this make more sense for you? And thank you for your fast reply.

Thanks, Thomas

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [September 17, 2013, 9:29am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/4 "2013-09-17T09:29:06Z")

</div>

We're not entirely clear on this, but our understanding that you want to allow a build to stay queued while a previous build is running for the same configuration.&nbsp;

Any new changesets received for the same configuration should be added to this queued build while the previous build is running. Once the previous build finishes, the queued build would run, building the latest changeset at that time.&nbsp;

This is similar to a quiet period which lasts as long as the previous build runs. The option would be something like "Stay quiet while another build is running".&nbsp;

Are we describing the same process?

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 17, 2013, 9:48am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/5 "2013-09-17T09:48:30Z")

</div>

Hi Dave   
  
 Yes, that is the behavior we are after.   
  
 Best regards, Thomas

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 18, 2013, 12:53pm UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/6 "2013-09-18T12:53:22Z")

</div>

+1. It’s amazing how many times I submit a change set then start working on the next bug or nunit failure and find a quick fix in \<5 minutes. I would love continua to discard any interim builds that are in the queue if new changes come in. This is particularly important for integration testing nunit runs that can take considerable time to complete.

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [September 18, 2013, 2:19am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/7 "2013-09-18T02:19:49Z")

</div>

The behavior that Dave described is something we will look at adding. At this time I have no idea if it’s a simple task or not, or in what timeframe it will be done (depends very much on complexity and other task priorities). It has been written up in our system as a feature request.

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 18, 2013, 8:28am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/8 "2013-09-18T08:28:24Z")

</div>

Happy to hear you have included this in your backlog.   
  
 The solution Dave describes are fine, but I think it could also be solved using your discard conditions if we had some more options, as Jamie is describing. If this is simpler and fits your current flows better.   
  
 Looking forward to get that feature… and thank you for a nice product.

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [September 18, 2013, 8:49am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/9 "2013-09-18T08:49:21Z")

</div>

Discard conditions only operate on the build currently being queued, they won’t allow you to kill a build that’s already queued/running. I did look at the object model for the discard conditions, but it’s not a simple thing to provide it with access to the number of running builds for that configuration, as repository branches also need to be taken into account (a build running with a commit in branch A is not treated the same as a build running in branch B).   
  
 I agree we need to implement something like what has been requested/described, but it will need some careful thought and research to implement something that fits the needs and doesn’t cause other problems.

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 18, 2013, 8:52am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/10 "2013-09-18T08:52:49Z")

</div>

Great, glad to hear. Looking forward to see what you come up with.

---

<div class="post-metadata">

**Author:** ![skdhc](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/b9bd4f/32.png) [@skdhc](https://www.finalbuilder.com/forums/u/skdhc)\
**Post date:** [August 16, 2018, 2:57am UTC](https://www.finalbuilder.com/forums/t/make-continua-discard-a-build-if-when-new-build-is-queued/5065/11 "2018-08-16T02:57:24Z")

</div>

+1 on this feature for a queued build to accumulate changes instead of having several individual queued builds. My build runs for 30 mins and I don’t want to set a quiet period of that time if there is an available spot to run the build.
