Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: stop spurious warnings on buildkit shutdown #78

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -315,7 +315,7 @@ actionsToolkit.run(
});
}
try {
const {stdout} = await execAsync('pgrep -f buildkitd');
const {stdout} = await execAsync('pgrep buildkitd');
if (stdout.trim()) {
await shutdownBuildkitd();
core.info('Shutdown buildkitd');
@@ -490,8 +490,8 @@ export async function shutdownBuildkitd(): Promise<void> {
// Wait for buildkitd to shutdown with backoff retry
while (Date.now() - startTime < timeout) {
try {
await execAsync('pgrep -f buildkitd');
// Process still exists, wait and retry
const {stdout} = await execAsync('pgrep buildkitd');
core.debug(`buildkitd process still running with PID: ${stdout.trim()}`);
await new Promise(resolve => setTimeout(resolve, backoff));
} catch (error) {
if (error.code === 1) {
4 changes: 2 additions & 2 deletions src/setup_builder.ts
Original file line number Diff line number Diff line change
@@ -138,9 +138,9 @@ async function startBuildkitd(parallelism: number, device: string): Promise<stri

while (Date.now() - startTime < timeout) {
try {
const {stdout} = await execAsync('pgrep -f buildkitd');
const {stdout} = await execAsync('pgrep buildkitd');
if (stdout.trim()) {
core.debug('buildkitd daemon started successfully');
core.info(`buildkitd daemon started successfully with PID ${stdout.trim()}`);
return addr;
}
} catch (error) {