GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — fix: handle double setup-docker-builder invocations gracefully by pbardea · Pull Request #71 · useblacksmith/setup-docker-builder Conversation
|
|
When you rebuild I will test this again! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@chadxz - sorry for the delay you should be good to go here! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Tested this against our monorepo where we hit the original bug. We have composite actions that call Set up a workflow that calls The logs show the fix working as expected -- first invocation starts buildkitd, second invocation detects it and bails out early: Cleanup also looked correct -- the second post-step skipped shutdown since it did not start buildkitd, and the first post-step shut it down gracefully. Full job logs: https://app.blacksmith.sh/convergint/runs/23514311534/jobs/68442899155 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
When this action is invoked multiple times within the same job, the second invocation now detects the existing buildkitd process and reuses the builder instead of throwing an error. Key changes: - Move pgrep check to the top of startBlacksmithBuilder() and return early with addr=null when buildkitd is already running - Extract maybeShutdownBuildkitd() so only the instance that started buildkitd performs shutdown (checked via getBuildkitdAddr) - Preserve SIGKILL detection from the shutdown path - Update fallback warning to cover both skipped and failed states Co-authored-by: Codesmith <[email protected]>
89e1f28 to
dc5a171
Compare
|
@codesmith can you assert theres no regressions in the shutdown, error handling and metrics reporting in this patch |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The source last changed at Now, here's my thorough regression analysis of the shutdown, error handling, and metrics reporting: Shutdown logic — I compared the old inline shutdown code (lines 680-776 in main branch) against the new Error handling — The pgrep exit-code-1 handling (no process found) is preserved in both the startup check ( Metrics reporting — All three metric reports are preserved:
The One cosmetic difference: the second-invocation path no longer reports No regressions found. The refactoring is a faithful extraction that actually improves error isolation slightly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.