Max workspaces and strong consistency locks

pull/437/head
Frostebite 2022-10-18 20:03:33 +01:00
parent 6beb4d0ba9
commit b8daa46233
4 changed files with 4 additions and 4 deletions

2
dist/index.js vendored
View File

@ -3652,7 +3652,7 @@ mkdir -p /data/cache
cp -a /github/workspace/cloud-runner-cache/. ${sharedFolder} cp -a /github/workspace/cloud-runner-cache/. ${sharedFolder}
${commands} ${commands}
cp -a ${sharedFolder}. /github/workspace/cloud-runner-cache/ cp -a ${sharedFolder}. /github/workspace/cloud-runner-cache/
`; `;
fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, fileContents, { fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, fileContents, {
flag: 'w', flag: 'w',
}); });

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -95,7 +95,7 @@ mkdir -p /data/cache
cp -a /github/workspace/cloud-runner-cache/. ${sharedFolder} cp -a /github/workspace/cloud-runner-cache/. ${sharedFolder}
${commands} ${commands}
cp -a ${sharedFolder}. /github/workspace/cloud-runner-cache/ cp -a ${sharedFolder}. /github/workspace/cloud-runner-cache/
`; `;
writeFileSync(`${workspace}/${entrypointFilePath}`, fileContents, { writeFileSync(`${workspace}/${entrypointFilePath}`, fileContents, {
flag: 'w', flag: 'w',
}); });

View File

@ -42,7 +42,7 @@ describe('Cloud Runner Locking', () => {
expect(isExpectedLockedAfterLocking).toBeTruthy(); expect(isExpectedLockedAfterLocking).toBeTruthy();
const locksBeforeRelease = await SharedWorkspaceLocking.GetAllLocks(newWorkspaceName, buildParameters); const locksBeforeRelease = await SharedWorkspaceLocking.GetAllLocks(newWorkspaceName, buildParameters);
CloudRunnerLogger.log(JSON.stringify(locksBeforeRelease, undefined, 4)); CloudRunnerLogger.log(JSON.stringify(locksBeforeRelease, undefined, 4));
expect(locksBeforeRelease.length > 1).toBeTruthy(); expect(locksBeforeRelease.length === 1).toBeTruthy();
await SharedWorkspaceLocking.ReleaseWorkspace(newWorkspaceName, runId, buildParameters); await SharedWorkspaceLocking.ReleaseWorkspace(newWorkspaceName, runId, buildParameters);
const locks = await SharedWorkspaceLocking.GetAllLocks(newWorkspaceName, buildParameters); const locks = await SharedWorkspaceLocking.GetAllLocks(newWorkspaceName, buildParameters);
expect(locks.length === 1).toBeTruthy(); expect(locks.length === 1).toBeTruthy();