Promote graceful scale-in for actions-runner to global modules#269
Merged
Conversation
Follow-up to #265 (development) and #268 (sandbox). Copies the graceful scale-in implementation from environments/sandbox/modules/profile/github_runner/ into the top-level modules/profile/github_runner/ so all remaining environments pick it up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
infrahouse8
approved these changes
Apr 19, 2026
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.
Summary
environments/sandbox/modules/profile/github_runner/to the top-levelmodules/profile/github_runner/(follow-up to Graceful scale-in for actions-runner (development) #265 dev, Promote graceful scale-in for actions-runner to sandbox #268 sandbox).gha-lifecycle-heartbeater.sh,gha-lifecycle-heartbeater.timer,gha-on-runner-exit.sh,gha-lifecycle-heartbeater.service.erb) and 5 updated (gha_prerun.sh,register.pp,service.pp,actions-runner.service.erb,start-actions-runner.sh.erb).modules/profile/github_runner/is byte-identical to the sandbox copy; production and other environments without overrides pick it up.Closes #267.
Deployment strategy
Same gradual, Puppet-first approach used for sandbox in #268:
delete_registration_tokenunder old IAM and the missing-fact path forderegistration_hookname.terraform-aws-actions-runnerPart 1 (new fact + IAM) to remaining production AWS accounts.Note: the environment-specific copies in
environments/development/andenvironments/sandbox/are deliberately kept for now so their bake periods remain pinned to the version they were validated on. Cleanup of those overrides is out of scope for this PR.Test plan
Phase 1 — old-Terraform / new-Puppet (this PR)
puppet-lint --fail-on-warningsclean on global profile module (done locally).delete_registration_tokenbehavior under old IAM characterized — fails loudly but runner still terminates cleanly.deregistration_hooknamefact absent do not cause fatal errors in Puppet or lifecycle scripts.Terminating:Waitinstances beyondheartbeat_timeoutthat would not also have been stuck pre-change.Phase 2 — after Terraform Part 1 is applied to all production accounts
ValidationErroronSetInstanceProtectionin CloudTrail during production scale-in events.Terminating:Waitinstances beyondheartbeat_timeout.delete_registration_tokensucceeds (noAccessDeniedException)..claude/plans/actions-runner-scale-in-race.mdverified across production runners.🤖 Generated with Claude Code