2

I am setting up a basic pipeline using Cloud Build, based on a Github trigger but running into the following error:

Your build failed to run: generic::failed_precondition: generic::failed_precondition: no concurrent builds quota available to create builds

I checked:

  • That the region I am working with (europe-west2) has no particular limits / quotas, as per the docs

enter image description here

  • My project has billing enabled
  • I haven't reached default thresholds inadvertently by checking my quotas consumption

gcp quotas

  • And tried to cancel some of the numerous failed builds in case Cloud Build would have a retry mechanism for each one of them that would contribute to exceeding the quotas. But got Requested entity was not found, which leads me into thinking that this was a wrong assumption and therefore not a cause for trouble.

enter image description here

My cloudbuild.json FYI:

{
  "steps": [
    {
      "name": "gcr.io/cloud-builders/docker",
      "args": [
        "build",
        "-t",
        "europe-west2-docker.pkg.dev/${PROJECT_ID}/REPONAME/front-end:${COMMIT_SHA}",
        "."
      ]
    }
  ],
  "options": {
    "logging": "CLOUD_LOGGING_ONLY"
  }
}

Any idea?

Thanks,

Stf_F
  • 846
  • 9
  • 23
  • Check if this applies to your project: https://cloud.google.com/build/docs/locations#restricted_regions_for_some_projects – John Hanley Aug 24 '22 at 19:47
  • Hi @JohnHanley, thanks. I did check already, that's the same link I was referencing in my post. These limits do not apply as I am building in europe-west2. Cheers – Stf_F Aug 24 '22 at 19:54
  • As a suggestion, per Stack Overflow guidelines, include all details that might help in your question. The content of links can change, be modified, deleted, etc rendering your question less useful in the future. – John Hanley Aug 24 '22 at 20:25
  • Roger that, done. – Stf_F Aug 24 '22 at 20:39
  • As per [document](https://cloud.google.com/build/docs/automating-builds/create-manage-triggers#connect_repo) If you select global as your region, default pools are used to run your build. And if you want to use the regional trigger you need to set up a [private pool](https://cloud.google.com/build/docs/private-pools/private-pools-overview). And if there are any additional information from build logs, can you share that? – Roopa M Aug 25 '22 at 07:16
  • Hi @RoopaM, I did setup the exact same trigger in europe-west1, while keeping my artifacts repo and images in europe-west2 and had no problem there. No need for private pools as the original region of my trigger was set to europe-west2. There aren't any logs unfortunately as the build would not even start. It fails the "precondition". So currently, I have a workaround but still no clue as to what the problem is. – Stf_F Aug 25 '22 at 11:16

1 Answers1

5

As per your above comment

I did setup the exact same trigger in europe-west1, while keeping my artifacts repo and images in europe-west2 and had no problem there

it seems your project is under restriction. The line in doc says

Depending on usage, certain projects may be restricted to only use Cloud Build in the following regions`

Which means if the project is in restricted mode then cloud builds can be triggered in following regions only, not in other regions.

  • us-central1
  • us-west2
  • europe-west1
  • asia-east1
  • australia-southeast1
  • southamerica-east1

Maybe as your project in restrict mode,so triggers in europe-west2 is not working as europe-west2 is not there in the above list. And europe-west1 is there in the list,hence triggers are working for you when you switched your triggers to west-1.

To get the restriction details of your project whether it is restriction mode or not i think the only channel you have to reach out is sales team or technical support where you can get additional help over there.

Roopa M
  • 2,171
  • 4
  • 12