Log the graceful-stop error instead of silently discarding it in gracefulStopContainer (#1782)

- Closes #1756.
- `RuntimeService.gracefulStopContainer(_:signal:timeout:)`
  wraps the graceful-stop attempt in `do { … } catch {}`. The
  empty catch silently discards any thrown error before falling
  through to the unconditional `lc.stop()`. It is the only catch
  in this file that does not log; every other one uses
  `self.log.error(…, metadata: ["error": "\(error)"])`.
- This adds a single log line matching that convention, so
  a failed graceful stop (and the resulting fall-through to a
  forced VM shutdown) is more diagnosable. The intentional
  fall-through to `lc.stop()` is unchanged.
This commit is contained in:
Bhavesh Varma
2026-06-23 10:46:00 -07:00
committed by GitHub
parent 5e125d8e2a
commit 1d70dd6ab9
@@ -1242,7 +1242,9 @@ public actor RuntimeService {
return code
}
} catch {}
} catch {
self.log.error("graceful stop failed; forcing vm shutdown", metadata: ["error": "\(error)"])
}
// Now actually bring down the vm.
try await lc.stop()