Skip to content

Commit e454ed1

Browse files
ryan-williamsclaude
andcommitted
Add run number and repo name to runner labels
Labels now include: - `run-{N}` - GitHub Actions run number - `{repo}` - repository name Full label format: lambda,gpu_1x_a10,us-east-1,GPU,run-42,myrepo,runner-xxx Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 7f0e808 commit e454ed1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/lambda_gha/start.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,15 @@ def create_instances(self) -> dict[str, dict]:
497497
# Failed to launch for this token
498498
continue
499499

500-
# Build full labels including instance type and region
501-
# Format: lambda,<instance_type>,<region>,GPU,<user_labels>,<random_label>
500+
# Build full labels including instance type, region, and run info
501+
# Format: lambda,<instance_type>,<region>,GPU,run-N,<repo>,<user_labels>,<random_label>
502+
run_num = template_vars.get("run", "")
503+
repo_name = template_vars.get("repo", "")
502504
auto_labels = ["lambda", successful_type, successful_region, "GPU"]
505+
if run_num:
506+
auto_labels.append(f"run-{run_num}")
507+
if repo_name:
508+
auto_labels.append(repo_name)
503509
if self.labels:
504510
all_labels = auto_labels + [self.labels] + [label]
505511
else:

0 commit comments

Comments
 (0)