Skip to content

fix: combine upstream fixes for scale-down and scale-up lambdas#2

Merged
shivdesh merged 1 commit into
isovalent:mainfrom
shivdesh:fix/upstream-combined-fixes
Mar 27, 2026
Merged

fix: combine upstream fixes for scale-down and scale-up lambdas#2
shivdesh merged 1 commit into
isovalent:mainfrom
shivdesh:fix/upstream-combined-fixes

Conversation

@shivdesh

Copy link
Copy Markdown
Collaborator

Summary

This PR combines two upstream fixes from github-aws-runners/terraform-aws-github-runner:

Fix 1: Prevent EC2 termination when GitHub runner de-registration fails

Fix 2: Prevent negative TotalTargetCapacity when runners exceed maximum

Changes

  • scale-down.ts: Extract deleteGitHubRunner() helper, only terminate EC2 if all de-registrations succeed
  • scale-up.ts: Add Math.max(0, ...) guard to prevent negative target capacity

Testing

  • All existing tests pass
  • Added test cases for both fixes

- Prevent EC2 termination when GitHub runner de-registration fails
  (upstream PR github-aws-runners#5061)
- Prevent negative TotalTargetCapacity when runners exceed maximum
  (upstream PR github-aws-runners#5062)

Changes:
- scale-down.ts: Extract deleteGitHubRunner() helper, only terminate
  EC2 if all de-registrations succeed
- scale-up.ts: Add Math.max(0, ...) guard to prevent negative runner count
@shivdesh shivdesh force-pushed the fix/upstream-combined-fixes branch from 7a368bc to 0bea361 Compare March 27, 2026 18:00
@shivdesh shivdesh merged commit 6d2ce70 into isovalent:main Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants