fix
parent
e898fb615d
commit
fdd143849b
|
@ -5740,7 +5740,8 @@ 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]}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static DoesCacheKeyTopLevelExist(buildParametersContext) {
|
static DoesCacheKeyTopLevelExist(buildParametersContext) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -22,7 +22,8 @@ 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]}`);
|
||||||
}
|
}
|
||||||
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}`);
|
||||||
|
|
|
@ -230,7 +230,8 @@ describe('Cloud Runner Locking', () => {
|
||||||
expect(lockFilesExist).toBeTruthy();
|
expect(lockFilesExist).toBeTruthy();
|
||||||
const result: string[] = [];
|
const result: string[] = [];
|
||||||
const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParameters);
|
const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParameters);
|
||||||
for (const element of workspaces) {
|
for (let element of workspaces) {
|
||||||
|
element = `${element.split(`_`)[1]}_${element.split(`_`)[2]}`;
|
||||||
await new Promise((promise) => setTimeout(promise, 1500));
|
await new Promise((promise) => setTimeout(promise, 1500));
|
||||||
const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParameters);
|
const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParameters);
|
||||||
const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParameters);
|
const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParameters);
|
||||||
|
|
Loading…
Reference in New Issue