add retry to umount logic incase proc is still running
parent
a759557443
commit
279255870a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
11
src/main.ts
11
src/main.ts
|
@ -587,8 +587,19 @@ actionsToolkit.run(
|
|||
if (stateHelper.remoteDockerBuildStatus != '') {
|
||||
try {
|
||||
await shutdownBuildkitd();
|
||||
for (let attempt = 1; attempt <= 3; attempt++) {
|
||||
try {
|
||||
await execAsync(`sudo umount ${mountPoint}`);
|
||||
core.debug(`${device} has been unmounted`);
|
||||
break;
|
||||
} catch (error) {
|
||||
if (attempt === 3) {
|
||||
throw error;
|
||||
}
|
||||
core.warning(`Unmount failed, retrying (${attempt}/3)...`);
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
}
|
||||
}
|
||||
if (stateHelper.remoteDockerBuildStatus == 'success') {
|
||||
await reportBuildCompleted();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue