# Allowed to fail job, if canceled, the whole build is marked as canceled

**URL:** <https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** web-ui, bug\
**Created:** [October 28, 2020, 1:13pm UTC](https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335 "2020-10-28T13:13:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 20, 2020, 3:04am UTC](https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335/6 "2020-11-20T03:04:26Z")

</div>

> [@popovicsandras](#):
>
> However since we are using nx, which is an npm package, we need the node\_modules restored from cache. Since we are talking about a monorepo, with dependency single version policy, the node\_modules can be heavy. Even with combining Travis cache + our own S3 based cache, in best case scenario, the job needs 2.5 **minutes** on average until it reaches the point, when it can decide whether it needs to stop or can proceed.

But if you decide whether a job needs to run in a “job manager” job, you don’t really need to pull Nx in each job to be able to cancel it. You only need to send that job some signal – e.g. by placing a flag into workspace contents.  
Without [Run a chunk of user code before the stock installation logic](https://travis-ci.community/t/run-a-chunk-of-user-code-before-the-stock-installation-logic/4141), this probably means that you cannot use much of Travis’ stock logic (restore package cache, install custom software) and will have to do the same stuff manually.

* * *

The other “natural way” I suggested in [How to skip jobs based on the files changed in a subdirectory? - #15 by native-api](https://travis-ci.community/t/how-to-skip-jobs-based-on-the-files-changed-in-a-subdirectory/2979/15) is to use “beefier build machines” that would be able to run lots of tasks in parallel. Note that whenever you split a build into jobs by hand, you’re taking a tax of an artificial barrier (not unlike nested makefiles) and having to set up the environment in every job.

Unless Travis can provide you with those on demand (they never commented either way), you’ll need to purchase Travis Enterprise which would allow you to build on your own worker machines of however much power you need. If you need to run 50 jobs in parallel every build and lots and lots of builds per day, you seem to be a large-scale enough consumer for that.

---

_[View the full topic](https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335)._
