-
Notifications
You must be signed in to change notification settings - Fork 102
Parallelize the identification of files that need to be scaled down #6857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
]; | ||
|
||
mocked(listRunners).mockResolvedValue(runners); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
// Verify parallel execution - check that we have both start and end calls | ||
const startCalls = callOrder.filter(call => call.startsWith('start-')); | ||
const endCalls = callOrder.filter(call => call.startsWith('end-')); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
]; | ||
|
||
mocked(listRunners).mockResolvedValue(runners); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
// Track concurrent calls | ||
let concurrentCalls = 0; | ||
let maxConcurrentCalls = 0; | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
mocked(listGithubRunnersOrg).mockImplementation(async (org, metrics) => { | ||
concurrentCalls++; | ||
maxConcurrentCalls = Math.max(maxConcurrentCalls, concurrentCalls); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
maxConcurrentCalls = Math.max(maxConcurrentCalls, concurrentCalls); | ||
|
||
await new Promise(resolve => setTimeout(resolve, 10)); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
|
||
// Verify all GitHub API calls were made | ||
expect(mocked(listGithubRunnersOrg)).toHaveBeenCalledTimes(5); // 3 for processing + 2 for offline cleanup (org1 and org2) | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
]; | ||
|
||
mocked(listRunners).mockResolvedValue(runners); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
]; | ||
|
||
mocked(listRunners).mockResolvedValue(runners); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
|
||
// All runners should have been processed (50 for processing + 50 for offline cleanup) | ||
expect(mocked(listGithubRunnersRepo)).toHaveBeenCalledTimes(100); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
pls run lint! |
but I like the idea, I believe this is something we should pursuit |
wait no, don't do it simply like this. Do in batches, of dozens. This will for sure trigger the throttling thing we have with GHA API |
const runners = Array.from({ length: 25 }, (_, i) => ({ | ||
awsRegion: baseConfig.awsRegion, | ||
instanceId: `runner-${i}`, | ||
repo: `owner/repo${i}`, |
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
launchTime: dateRef.clone().subtract(minimumRunningTimeInMinutes + 5, 'minutes').toDate(), | ||
})); | ||
|
||
mocked(listRunners).mockResolvedValue(runners); |
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
// Track concurrent calls to verify batching | ||
let currentConcurrentCalls = 0; | ||
let maxConcurrentCalls = 0; | ||
const concurrentCallHistory: number[] = []; |
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
const concurrentCallHistory: number[] = []; | ||
|
||
mocked(listGithubRunnersRepo).mockImplementation(async (repo, metrics) => { | ||
currentConcurrentCalls++; |
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
mocked(getRunnerTypes).mockResolvedValue(new Map([ | ||
['test-type', { is_ephemeral: false, min_available: 0 } as RunnerType] | ||
])); | ||
|
Check failure
Code scanning / lintrunner
SPACES/trailing spaces Error
No description provided.