ci(verify): give each CodeBuild job a unique runner label - #2222
Closed
aidandaly24 wants to merge 2 commits into
Closed
ci(verify): give each CodeBuild job a unique runner label#2222aidandaly24 wants to merge 2 commits into
aidandaly24 wants to merge 2 commits into
Conversation
Every CodeBuild job in a run shares the codebuild-agentcore-e2e label and CodeBuild registers each runner with all labels its job requested, so a runner created for the Windows job also satisfies the plain Linux job. GitHub then runs the Linux job on Windows and the Windows job never gets a runner. A per-job label makes each job match only its own runner. https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-action-runners-update-labels.html
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Small, well-explained CI fix. Adding per-job labels (verify-linux, verify-windows) alongside the shared codebuild-agentcore-e2e-* label correctly disambiguates which CodeBuild-hosted runner satisfies which matrix job. The inline comment captures the failure mode clearly and links to the relevant AWS docs.
One thing to confirm out-of-band (not visible in the diff): the CodeBuild project's webhook/label configuration needs to actually register runners with these new labels — otherwise jobs will sit queued indefinitely. Assuming that's been set up on the AWS side, this is good to merge.
tejaskash
approved these changes
Sep 4, 2026
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Gives the Linux and Windows
verifymatrix jobs a unique runner label (verify-linux,verify-windows) so GitHub cannot route one job to the runner CodeBuild created for the other.Every CodeBuild job in a workflow run shares the
codebuild-agentcore-e2e-<run_id>-<attempt>label, and CodeBuild registers each ephemeral runner with every label its job requested. The Windows runner therefore carries{base, image:windows-1.0}, a superset of the plain Linux job's{base}. When the Windows runner registers while the Linux job is still queued, GitHub hands it the Linux job. The Linux runner that arrives next has only{base}, so the Windows job never matches and sits queued until someone cancels and reruns.Attempt 1 of the three runs reported in Slack shows exactly this pattern. In each, the Windows job was queued a few seconds before the Linux job, was cancelled without ever getting a runner, and a plain-label Linux job failed on a CodeBuild runner:
AWS documents this failure mode and recommends a unique custom label per job: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-action-runners-update-labels.html. CodeBuild ignores labels it does not recognize for build configuration but still registers them on the runner, so
verify-linuxandverify-windowsonly affect routing.Any future CodeBuild job added to a run that also calls
verify.ymlneeds its own label too, otherwise a plain-label job can still be picked up by theverify-linuxrunner and strand the Linux verify job.This PR targets the
feat/refactor-release-workflowbranch so the fix lands together withverify.ymlin #2206.ci.ymlonly triggers on PRs intomainandrefactor, so CI does not run on this PR itself; the change is exercised by the next CI run on #2206 after merge.Related Issue
N/A. CI routing fix for the runner mis-assignment reported in Slack. Folds into #2206.
Documentation PR
N/A
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsrunnervalue as JSON with the expressions substitutedSource tests were not run because this change only touches workflow runner labels.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.