googleapis / googleapis/google-cloud-node

Support other machine types (`enum MachineType`) in Cloud Build

Open
#4,325 1 comment 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

[As documented in the docs](https://googleapis.dev/nodejs/cloudbuild/latest/google.devtools.cloudbuild.v1.BuildOptions.html#.MachineType) the code only allows a short list of options for `machineType` here:

https://github.com/googleapis/google-cloud-node/blob/67ce45e56654cc295df11ecf7b3444832c77c48c/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto#L1856-L1874

This enum has diverged (?) from the offered machine-types documented on https://cloud.google.com/compute/docs/machine-types (which is also mentioned in the code comment linked above).

Please support other machine-types, or document how these machine-types can already be accessed (or document *why* they can't be accessed).
Furthermore, I'm not sure how I could change the compute zone for the T2A and C2 machines, which are only available in specific zones.

**Background**

I came here because I'm trying to experiment with our Google Cloudbuild (which was set up by someone else, and this is my first interaction with it).

We are currently using `N1_HIGHCPU_8`. However, our workloads are compute-bound and require high single-core performance. We were also overestimating our memory requirements.

Hence, I'd like to try some of the following machine types (for potential cost reduction + performance increase), extrapolated from the current setting:

- machineType: 'N1_HIGHCPU_8' (baseline)
- machineType: 'N2_STANDARD_2'
- machineType: 'N2_HIGHCPU_4'
- machineType: 'C2_STANDARD_4'
- machineType: 'T2A_STANDARD_1'
- machineType: 'T2A_STANDARD_2'
- (Custom machine types in the future, depending on the outcome of tests on those machines)

Triggered via GitHub, it returned:

`failed unmarshalling build config cloudbuild-other.yaml: unknown value ""N2_STANDARD_2"" for enum google.devtools.cloudbuild.v1.BuildOptions.MachineType`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.