Failed Rebuild Leaves GitHub Codespace Unresponsive After Dev Container Modification
0 reputation · 13 Mar 2020, 03:46 UTC
0 reputation · 13 Mar 2020, 03:46 UTC
The Rebuild feature reapplies devcontainer.json, Dockerfile and container features to an existing codespace without creating a new one.
When the rebuild fails, the codespace may become unable to start, raising uncertainty about whether the prior container state is retained.
GitHub documentation does not promise an automatic rollback to the previous image, and rebuild logs can vary between the web UI, VS Code and the CLI, making verification ambiguous. Additionally, any uncommitted changes in the codespace filesystem are transient and may be lost if the codespace is removed.
Does the Rebuild action automatically revert to the prior container image when the new definition fails? If not, what steps are required to restore the previous working state without losing uncommitted changes? Which rebuild log details indicate whether a rollback occurred or remained failed?
No, the Rebuild action does not automatically revert to the prior container image.
Likely explanation: The rebuild may fail during image construction, feature installation, or container startup, leaving the codespace stopped or unable to start; the old image or configuration is not automatically rolled back.
Confirmed facts: The Rebuild command reapplies devcontainer.json, Dockerfile and features to the existing container; it does not perform an automatic rollback to a previous working state.
Missing diagnostic: Can any client or recovery mode still open the codespace? If yes, you can back up the work directly; if no, prioritize storage recovery through GitHub support because self‑service restoration of the container’s filesystem is not guaranteed.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.