Skip to content

fix(scale-up): return partial runner creation results#5220

Open
edersonbrilhante wants to merge 5 commits into
refactor-runner-provider-splitfrom
refactor-partial-batch-errors
Open

fix(scale-up): return partial runner creation results#5220
edersonbrilhante wants to merge 5 commits into
refactor-runner-provider-splitfrom
refactor-partial-batch-errors

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Refactor runner creation to return structured partial-success results instead of throwing ScaleError.

  • Return created instance IDs with retryableErrorCount and nonRetryableErrorCount.
  • Preserve successfully created EC2 instances when Fleet or dedicated-host requests only partially succeed.
  • Classify configured scale errors, transient AWS errors, network failures, throttling, and server failures as retryable.
  • Treat unclassified AWS errors as non-retryable.
  • Propagate the result contract through EC2, pool, and scale-up providers.
  • Convert unexpected provider exceptions into retryable result counts.
  • Treat GitHub runner registration failures as retryable and terminate the affected EC2 instances.
  • Retry only the corresponding number of SQS messages.
  • Remove the obsolete ScaleError implementation and handler logic.
  • Skip unsupported event types without retrying them.

Test Plan

TBD

Related Issues

None.

@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner July 22, 2026 21:40
@edersonbrilhante
edersonbrilhante marked this pull request as draft July 22, 2026 21:40
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@edersonbrilhante
edersonbrilhante marked this pull request as ready for review July 23, 2026 11:16
@@ -58,6 +57,12 @@ export async function scaleUpHandler(event: SQSEvent, context: Context): Promise
try {
const rejectedMessageIds = await scaleUp(sqsMessages);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would rename here the const name, since the return value is now the result. So a more logical name woudl be createRunnerResult

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scaleUp still returning the same rejectedMessageIds. That is a list of messageId that will send to ReportBatchItemFailures.

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