Skip to content

Commit 89dbdc5

Browse files
committed
Add shape override
1 parent ead89ba commit 89dbdc5

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/gcp-test.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ on:
2626
description: 'Image to test, overrides version_major to test a direct image instead. Architecture must be set properly for the image being passed. This must be a full path to a GCP image, for example, projects/almalinux-dev-images-469421/global/images/almalinux-9-v20230920'
2727
required: false
2828
default: ''
29+
x86_shape_override:
30+
description: 'x86_64 shape to use for jobs that do not iterate over matrix.shape (e.g. test-gcp-nonpershape). Empty = let cloud-image-tests choose. Example: c4-standard-8.'
31+
required: false
32+
default: ''
33+
aarch64_shape_override:
34+
description: 'aarch64 shape to use for jobs that do not iterate over matrix.shape (e.g. test-gcp-nonpershape). Empty = let cloud-image-tests choose. Example: c4a-standard-8.'
35+
required: false
36+
default: ''
2937
# notify_mattermost:
3038
# description: "Send notification to Mattermost"
3139
# required: true
@@ -137,6 +145,9 @@ jobs:
137145
with:
138146
image: "${{ needs.init-data.outputs.image_path }}${{ inputs.image_override == '' && matrix.arch == 'aarch64' && '-arm64' || '' }}"
139147
filter: '^(lssd|disk|vmspec)$'
148+
# If an arch-matching shape_override input is set, pin the shape;
149+
# otherwise leave empty and let cloud-image-tests pick its hardcoded shapes.
150+
shape_flag: "${{ matrix.arch == 'aarch64' && inputs.aarch64_shape_override != '' && format('-arm64_shape {0}', inputs.aarch64_shape_override) || matrix.arch == 'x86_64' && inputs.x86_shape_override != '' && format('-x86_shape {0}', inputs.x86_shape_override) || '' }}"
140151
parallel_stagger: '10s'
141152
zones: ${{ env.GCP_DEFAULT_ZONES }}
142153
creds_path: ${{ env.GOOGLE_GHA_CREDS_PATH }}
@@ -301,9 +312,13 @@ jobs:
301312
- shape: c4a-standard-96-metal
302313
# low quota for this one
303314
parallel_count: 1
304-
# # only available in us-central1-b and us-east1-f
305-
# zone: us-central1-b
306-
# zones: "us-central1-b us-east1-f"
315+
# `zone:` / `zones:` declared as empty strings so the keys exist
316+
# on the matrix type (for the cit-run-with-retry expressions
317+
# below). Set a real value here to pin the first attempt for
318+
# this shape. Original guidance: only available in us-central1-b
319+
# and us-east1-f.
320+
zone: ''
321+
zones: ''
307322
steps:
308323
# this isn't a great way to handle this, but GH actions has limitations...
309324
- name: Skip certain jobs

0 commit comments

Comments
 (0)