🐙

Check! GitHub Codespacesが5/1 update以降に立ち上がらない場合は rebuild を試す

2021/05/02に公開

Prologue

ベータ版として試用できる GitHub Codespaces が、5/1 に内部的なアップデートがあったようです。2020/11/1 以前に作成した Codespaces インスタンスは、更新後の環境と互換性がないため利用できなくなるので、データを退避しておくよう通知が来ていました。

アップデート後の 5/1 以降に起動したとき、リビルドを促されるパターンと、起動に失敗するパターンに遭遇したので、備忘録を記しておきます。(後者はもしかしたらリビルドの通知を見逃しただけかもしれません。)

GitHub からの通知内容

Thank you for your continued participation in the Codespaces limited beta. As the beta has progressed, we’ve continued to focus on improving the performance of the service. One impact of this work is that Codespaces created prior to November 1, 2020 will be incompatible with the latest platform updates and will be deleted.
Here are the steps you can take to preserve your code from any of these older codespaces:

  1. Go to github.com/codespaces
  2. Open up your codespace created before November 1st, 2020
  3. Push changes from these codespaces before May 1, 2021.
    After May 1st, these codespaces will no longer be accessible.

GitHub からのお知らせ

リビルドを促されるパターン

リビルドを促されるパターンは、下記のようなメッセージが表示されるので、指示に従い「Rebuild now」ボタンからリビルドすることで、その後起動できました。

This codespaces uses a container version that will stop working on May 1. Please update the container version by rebuilding the codespace by May 1 to avoid losing access to this codespaces.

リビルドを促されるメッセージ

起動失敗のエラーが出てしまうパターン

2つ稼働している他方の Codespace では、上記のメッセージが表示されず(見逃しただけかも)、下記のエラーが表示されて少し悩みました。

The terminal process failed to launch: Starging directory (cwd) "/home/codespaces/workspaces/<repository name>" does not exist.

起動に失敗した旨のエラーメッセージ

状況としては、上記と同様にリビルドが必要な状況だと推察し、明示的にリビルドしたところ、無事に起動しました。👏(この場合は Command Palette で Codespaces: Rebuild Contaqiner を実行)

Run rebuild container

Progress rebuilding container

Epilogue

大した内容ではないですが、もし起動できず困っている人が居るかもしれないので書き留めてみました。

GitHub Codespaces は、ブラウザでもスムーズに利用できるし、手元の Visual Studio Code でも利用できるし、すごく便利です!

https://code.visualstudio.com/docs/remote/codespaces

GAが楽しみです🚀

Discussion