Sending SIGTERM to buildkitd for graceful shutdown
Warning: buildkitd did not shutdown gracefully after 30 seconds, forcing shutdown with SIGKILL
Warning: Disk may be in a bad state after SIGKILL - will prevent sticky disk commit
Warning: buildkitd was forcefully terminated with SIGKILL
Creating Blacksmith agent client with port: 1031
Shutdown buildkitd gracefully
...
All critical cleanup steps completed successfully
Checking for previous step failures before committing sticky disk
No previous step failures detected, committing sticky disk after successful cleanup
Creating Blacksmith agent client with port: 1031
Successfully committed sticky disk
There is a misleading log message here which says "Shutdown buildkitd gracefully" even if it did not.
However, more concerningly, it doesn't seem like the step failure detection works, and the sticky disk is committed regardless.
I guess the problem is that it relies on saving the job state, but I think that is intended for persisting state between the job execution and the post-job hook; I'm not convinced that that works within the post-job hook.