Github development environment, move to codespace and install in 10 seconds

On August 11, 2021, GitHub announced that it has enabled Codespaces, an integrated development environment accessible from a browser for teams or enterprise cloud plans. In addition, he added that most of the development of has been switched from macOS-based to codespace.

The core repository, which has been developing for 14 years, has more than 1 million commits, and most of them are developers who build or test on macOS. The repository is close to 13GB on disk and it takes about 20 minutes to clone. In addition, including setting dependencies, it takes more than 45 minutes to start the development environment in the codespace. He also said that he often had to bootstrap an hour or so whenever he created a branch in the commit object.

Therefore, GitHub has decided to convert the 14-year macOS-centric development environment into a codespace. First, when cloning Github from a codespace, a shallow clone is performed only for the latest version rather than a full clone that clones the entire repository locally, and when the codespace is restarted with the latest commit, the repository history is removed in the background, Convert to a duplicate structure. As a result, the replication time has been reduced from 20 minutes to only 90 seconds.

Next, it caches the network of software and services supported by These software and services include existing gemfile-based dependencies as well as those written in custom builds of C, Go, and Ruby. Therefore, GitHub automates the flow, such as bootstrap dependencies by cloning the repository in GitHub Action, and the Docker image is used as a base image adapted to the codespace development environment in the devcontainer in GitHub. it became Therefore, more than 95% of the codespace development environment in was created in Bootstrap.

In addition, as the application or service was optimized, the release of the codespace development environment was reduced from 45 minutes to 5 minutes. However, GitHub says 5 minutes is too long to start right away, and one study says that it takes only 10 seconds for people to switch to a state of concentration.

Attempting to do a shadow clone to significantly reduce the time it takes to clone will help get your codespace up and running quickly, but you’ll need to do a full clone somewhere. Through this, the developer codespace environment is ready in 10 seconds by writing in advance that the cloning and bootstrap are completed.

Regarding the transition to the development environment, GitHub engineers have been skeptical of the codespace until now, but now it is different, stating that the CPU will never have to compile Ruby from source again. Github says that every day more and more services and more engineers are recruited to GitHub, and in the process, it is discovering new stories about the value that codespaces create, but at the center of the story is a consistent theme that resonates with all engineers and more Better tools are being discovered, productivity is increasing, and there is no going back. Related information can be found here.



Through the monthly AHC PC and HowPC magazine era, he has watched 'technology age' in online IT media such as ZDNet, electronic newspaper Internet manager, editor of Consumer Journal Ivers, TechHolic publisher, and editor of Venture Square. I am curious about this market that is still full of vitality.

Add comment

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most discussed

%d 블로거가 이것을 좋아합니다: