google-cloud-node
google-cloud-node copied to clipboard
Support other machine types (`enum MachineType`) in Cloud Build
As documented in the docs 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