From 6976118c687d328498ead2a76bb57318ba4f2bb8 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 1 Nov 2024 23:59:00 +0000 Subject: [PATCH] fix: bazelbot insufficient memory error https://cloud.google.com/build/docs/optimize-builds/increase-vcpu-for-builds#increase_vcpu_for_default_pools https://cloud.google.com/build/pricing The E-series is the current supported machine type. --- packages/bazel-bot/cloudbuild.yaml | 82 +++++++++++++++--------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/packages/bazel-bot/cloudbuild.yaml b/packages/bazel-bot/cloudbuild.yaml index 1ad01971f03..8dbe39ee831 100644 --- a/packages/bazel-bot/cloudbuild.yaml +++ b/packages/bazel-bot/cloudbuild.yaml @@ -1,41 +1,41 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -steps: -- name: 'gcr.io/cloud-builders/gcloud' - entrypoint: 'bash' - args: [ '-c', "gcloud secrets versions access latest --secret=bazel_bot_github_key --format='get(payload.data)' | tr '_-' '/+' | base64 -d > /workspace/bazel-bot-github-key.pem" ] - -- name: 'gcr.io/repo-automation-bots/bazel-bot' - env: - - 'BAZEL_FLAGS=--google_default_credentials --remote_cache=https://storage.googleapis.com/repo-automation-bots-bazel-cache' - - 'GITHUB_APP_INSTALLATION_ID=51826097' - - 'GITHUB_APP_ID=921015' - - 'GITHUB_APP_SECRET=/workspace/bazel-bot-github-key.pem' - # If as $sha is contained in a list of bad SHAs (SHAs that - # will cause bazel to fail) skip the sha. The variable $BROKEN_SHAS - # is defined in the Cloud Build UI, with the intention that it is only - # used for exceptional circumstances. - - "BROKEN_SHAS=$_BROKEN_SHAS" - # Use source/target branch variables to override the default git - # branch which is cloned. This is primarily used for preview - # branch support. - - "SOURCE_BRANCH=$_SOURCE_BRANCH" - - "TARGET_BRANCH=$_TARGET_BRANCH" - -timeout: '10800s' - -options: - machineType: 'N1_HIGHCPU_8' -logsBucket: 'gs://repo-automation-bots-bazel-gcb-logs' +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +steps: +- name: 'gcr.io/cloud-builders/gcloud' + entrypoint: 'bash' + args: [ '-c', "gcloud secrets versions access latest --secret=bazel_bot_github_key --format='get(payload.data)' | tr '_-' '/+' | base64 -d > /workspace/bazel-bot-github-key.pem" ] + +- name: 'gcr.io/repo-automation-bots/bazel-bot' + env: + - 'BAZEL_FLAGS=--google_default_credentials --remote_cache=https://storage.googleapis.com/repo-automation-bots-bazel-cache' + - 'GITHUB_APP_INSTALLATION_ID=51826097' + - 'GITHUB_APP_ID=921015' + - 'GITHUB_APP_SECRET=/workspace/bazel-bot-github-key.pem' + # If as $sha is contained in a list of bad SHAs (SHAs that + # will cause bazel to fail) skip the sha. The variable $BROKEN_SHAS + # is defined in the Cloud Build UI, with the intention that it is only + # used for exceptional circumstances. + - "BROKEN_SHAS=$_BROKEN_SHAS" + # Use source/target branch variables to override the default git + # branch which is cloned. This is primarily used for preview + # branch support. + - "SOURCE_BRANCH=$_SOURCE_BRANCH" + - "TARGET_BRANCH=$_TARGET_BRANCH" + +timeout: '10800s' + +options: + machineType: 'E2_HIGHCPU_32' +logsBucket: 'gs://repo-automation-bots-bazel-gcb-logs'