Stopping builds does not impact build queue & makes cancelling builds impossible

Hi everyone,

So I did a great thing today where I used Netlify CLI to create a bunch of sites from folders in my monorepo (they are all similar in nature).

I don’t want Netlify to build these sites, for it really is only needed when there’s a new release. Instead, I want to build them locally when needed, and publish them via the CLI.

Since I can’t use a netlify.toml file to tell netlify not to build them, I need to create them first, then go to the netlify UI to stop building the sites.

After I did that, I noticed there’s a ton of builds in my build queue. Turns out that there’s a dependabot pull request, and now Netlify has queued a build, seemingly before I was able to disable builds.

To make matters worse, now that builds are disabled, I don’t even have the ‘Cancel build’ button.

I realize this is a bit of an edge-case, but it seems that I should have some way to cancel this builds, or (even better) a queued build should check whether the site still wants to be built by the time a build slot becomes available.

Thanks for the report! I’ll get a feature request filed for putting the cancel build button back in place.

I wonder how you are creating the sites, as well as why you are linking a repo, if you don’t intend us to build from git? I think we can probably come up with a better workflow for you that won’t trigger a build - such as maybe not linking a repo if you won’t build from it :slight_smile:

Hi Chris, I created the sites via the UI, and if memory serves me right, selecting a repo is non-optional there, although I might have just overlooked it. Or perhaps I could do it via the CLI.

Anyway, about my use-case: I have a monorepo from which I build a bunch of NPM packages (GitHub - freesewing/freesewing: Freesewing's monorepo holding all our NPM packages, including our core library).
Some of these come with an ‘example’ folder that is sort of a mini development environment (using create-react-app).
I wanted to publish these online for it’s an easy way for us to reproduce problems. Eg: https://aaron.freesewing.dev/

Since this is a monorepo with a bunch of interlocking dependencies, and there’s a bunch of them, this is non-trivial to configure, and would also be very expensive in build minutes.
So I plan to update our workflow that when we publish NPM packages, we also publish a new build via Netlify CLI.

That’s why we never build these from a repo.
I hope I’m explaining myself at least somewhat coherent :slight_smile:

joost

Hi Chris, I created the sites via the UI, and if memory serves me right, selecting a repo is non-optional there, although I might have just overlooked it. Or perhaps I could do it via the CLI.

Indeed, if you choose “new site from git” in the UI, you must link a repo. But you can create sites in several other ways:

  • via CLI
  • via API
  • or you can start with a drag-and-drop upload, which does not require a repo to be linked (you can later connect the CLI or API to that site, or even add a repo to it)

Let me know if you can’t come up with a suitable workflow using one of those methods and what the blocker is, and I’ll see if I can come up with some better advice!

We’re good. I should have done them via the CLI to begin with, but I wasn’t smart enough back then :slight_smile:

Hi, @joostdecock. I wanted to follow-up to let you know this bug has been fixed. If you stop builds now, the “cancel deploy” button still appears and works normally.

To summarize, it is now possible to cancel builds even when the stop build option is selected.

Thanks for the update Luke, and thanks to the team for the great work :+1: