fixes
parent
c998f7ceee
commit
cf55eba4c5
|
@ -5741,7 +5741,7 @@ class SharedWorkspaceLocking {
|
||||||
return (yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/`))
|
return (yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/`))
|
||||||
.map((x) => x.replace(`/`, ``))
|
.map((x) => x.replace(`/`, ``))
|
||||||
.filter((x) => x.endsWith(`_workspace`))
|
.filter((x) => x.endsWith(`_workspace`))
|
||||||
.map((x) => `${x.split(`_`)[1]}_${x.split(`_`)[2]}`);
|
.map((x) => x.split(`_`)[1]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static DoesCacheKeyTopLevelExist(buildParametersContext) {
|
static DoesCacheKeyTopLevelExist(buildParametersContext) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,7 @@ export class SharedWorkspaceLocking {
|
||||||
)
|
)
|
||||||
.map((x) => x.replace(`/`, ``))
|
.map((x) => x.replace(`/`, ``))
|
||||||
.filter((x) => x.endsWith(`_workspace`))
|
.filter((x) => x.endsWith(`_workspace`))
|
||||||
.map((x) => `${x.split(`_`)[1]}_${x.split(`_`)[2]}`);
|
.map((x) => x.split(`_`)[1]);
|
||||||
}
|
}
|
||||||
public static async DoesCacheKeyTopLevelExist(buildParametersContext: BuildParameters) {
|
public static async DoesCacheKeyTopLevelExist(buildParametersContext: BuildParameters) {
|
||||||
const lines = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`);
|
const lines = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`);
|
||||||
|
|
|
@ -187,7 +187,7 @@ describe('Cloud Runner Locking', () => {
|
||||||
expect(
|
expect(
|
||||||
await SharedWorkspaceLocking.GetOrCreateLockedWorkspace(newWorkspaceName, runId2, buildParameters),
|
await SharedWorkspaceLocking.GetOrCreateLockedWorkspace(newWorkspaceName, runId2, buildParameters),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
expect(CloudRunner.lockedWorkspace).not.toMatch(newWorkspaceName);
|
expect(CloudRunner.lockedWorkspace).not.toContain(newWorkspaceName);
|
||||||
}, 150000);
|
}, 150000);
|
||||||
it(`0 free workspaces after locking`, async () => {
|
it(`0 free workspaces after locking`, async () => {
|
||||||
Cli.options.retainWorkspaces = true;
|
Cli.options.retainWorkspaces = true;
|
||||||
|
|
Loading…
Reference in New Issue