Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

The test 'calls publishRetryMessage even when maximum runners is reached' was missing verification that listEC2Runners is called when checking runner limits.

Changes

  • Added assertion to verify listEC2Runners is called with correct parameters when RUNNERS_MAXIMUM_COUNT='0'
  • Used toHaveBeenCalledWith matcher for consistency with modern Vitest practices

According to the scale-up logic (scale-up.ts:370-371), when maximumRunners is not -1, listEC2Runners must be called to get the current runner count. The test now verifies this behavior occurs as expected:

expect(listEC2Runners).toHaveBeenCalledWith({
  environment: 'unit-test-environment',
  runnerType: 'Org',
  runnerOwner: TEST_DATA_SINGLE.repositoryOwner,
});

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 5, 2026 12:59
Co-authored-by: stuartp44 <1926002+stuartp44@users.noreply.github.com>
Co-authored-by: stuartp44 <1926002+stuartp44@users.noreply.github.com>
Copilot AI changed the title [WIP] Update job retry mechanism based on feedback from previous PR Add listEC2Runners verification to maximum runners test Jan 5, 2026
Copilot AI requested a review from stuartp44 January 5, 2026 13:04
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

Dependency Review

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

Scanned Files

None

@stuartp44 stuartp44 marked this pull request as ready for review January 5, 2026 13:09
@stuartp44 stuartp44 requested review from a team as code owners January 5, 2026 13:09
@stuartp44 stuartp44 merged commit a218024 into stu/fix_job_retry Jan 5, 2026
1 of 3 checks passed
@stuartp44 stuartp44 deleted the copilot/sub-pr-4961-again branch January 5, 2026 13:09
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