src: stop spurious warnings on buildkit shutdown
parent
31dd0ccbdd
commit
4723a2a346
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -315,7 +315,7 @@ actionsToolkit.run(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const {stdout} = await execAsync('pgrep -f buildkitd');
|
const {stdout} = await execAsync('pgrep buildkitd');
|
||||||
if (stdout.trim()) {
|
if (stdout.trim()) {
|
||||||
await shutdownBuildkitd();
|
await shutdownBuildkitd();
|
||||||
core.info('Shutdown buildkitd');
|
core.info('Shutdown buildkitd');
|
||||||
|
@ -490,8 +490,8 @@ export async function shutdownBuildkitd(): Promise<void> {
|
||||||
// Wait for buildkitd to shutdown with backoff retry
|
// Wait for buildkitd to shutdown with backoff retry
|
||||||
while (Date.now() - startTime < timeout) {
|
while (Date.now() - startTime < timeout) {
|
||||||
try {
|
try {
|
||||||
await execAsync('pgrep -f buildkitd');
|
const {stdout} = await execAsync('pgrep buildkitd');
|
||||||
// Process still exists, wait and retry
|
core.debug(`buildkitd process still running with PID: ${stdout.trim()}`);
|
||||||
await new Promise(resolve => setTimeout(resolve, backoff));
|
await new Promise(resolve => setTimeout(resolve, backoff));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === 1) {
|
if (error.code === 1) {
|
||||||
|
|
|
@ -138,9 +138,9 @@ async function startBuildkitd(parallelism: number, device: string): Promise<stri
|
||||||
|
|
||||||
while (Date.now() - startTime < timeout) {
|
while (Date.now() - startTime < timeout) {
|
||||||
try {
|
try {
|
||||||
const {stdout} = await execAsync('pgrep -f buildkitd');
|
const {stdout} = await execAsync('pgrep buildkitd');
|
||||||
if (stdout.trim()) {
|
if (stdout.trim()) {
|
||||||
core.debug('buildkitd daemon started successfully');
|
core.info(`buildkitd daemon started successfully with PID ${stdout.trim()}`);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue