Skip to content

Commit 17062a6

Browse files
Copilothenrymercer
andcommitted
Simplify runnerSize logic and add clarifying comments
Co-authored-by: henrymercer <[email protected]>
1 parent 8afe386 commit 17062a6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pr-checks/sync.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,19 @@ def writeHeader(checkStream):
7676
if version == "latest":
7777
raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?')
7878

79-
# Determine runner size (default is "latest")
80-
# "default" maps to "latest" for the runner image name
79+
# Determine runner size
80+
# "default" is used in check specifications and maps to "latest" for the actual runner image
8181
runnerSize = checkSpecification.get('runnerSize', 'default')
82-
actualRunnerSize = 'latest' if runnerSize == 'default' else runnerSize
82+
if runnerSize == 'default':
83+
runnerSize = 'latest'
8384

8485
# Build runner images based on runner size and operating systems
8586
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"])
8687

8788
for operatingSystem in operatingSystems:
8889
# Construct the runner image name: {os}-{size}
89-
runnerImage = f"{operatingSystem}-{actualRunnerSize}"
90+
# Note: Not all OS types may support all runner sizes (e.g., only ubuntu-slim exists as of now)
91+
runnerImage = f"{operatingSystem}-{runnerSize}"
9092
matrix.append({
9193
'os': runnerImage,
9294
'version': version

0 commit comments

Comments
 (0)