BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News GitHub Codespaces Can Now Be Templated to Improve Performance

GitHub Codespaces Can Now Be Templated to Improve Performance

This item in japanese

GitHub has introduced prebuilt Codespaces to reduce the time it takes to spin up a full development environment for large, complex projects.

GitHub Codespaces provides a fully featured, cloud-based development environment that aims to improve developer experience in a number of ways. Among other benefits, Codespaces promises to speed up the process of setting up a development environment and to allow developers to start contributing to a project right away.

As it happens, though, spinning up a full development environment is not always quick as it requires to clone a repository, install dependencies and plug-ins, execute intialization scripts and so on. This means the time it takes to be ready to contribute varies significantly with the size of the project and complexity of its configuration.

To improve the performance of Codespaces with largest repositories, GitHub is introducing the possibility of prebuilding codespaces.

A prebuilt codespace will serve as a “ready-to-go” template where your source code, editor extensions, project dependencies, commands, and configurations have already been downloaded, installed, and applied.

While in beta, developers will be able to create prebuild configurations selecting which branch it is linked to and in which region the final image will run. Once a prebuild configuration is defined, the Codespaces service will take care of executing a GitHub Actions workflow associated to the configuration to create the corresponding devcontainer.

Every time you request a prebuilt codespace, the service will fetch a prebuilt template and attach it to an existing virtual machine, thus significantly reducing your codespace creation time.

If you ever need to modify a prebuild configuration, you can update its devcontainer configuration with a pull request.

According to GitHub, prebuilt codespaces have been a key factor in the process of GitHub adopting Codespaces as the default development platform. Additionally, GitHub ran a private preview of the new feature with approximately 50 organizations which led to a number of improvements that are already available, including a way to identify which machine types have a "prebuild ready" tag; simplifying the burden on admins with the introduction of the mentioned GitHub Actions workflows; and so on.

Prebuilt GitHub Codespaces are available to GitHub Enterprise Cloud and Teams organizations, albeit still in beta.

With an unrelated but almost simultaneous announcement, GitHub has opened its GitHub Advisory Database, a large database of vulnerabilities in software dependencies, to community contributions. The Advisory Database content is now available in a public repo and provided a specific interface to make contributions. Do not miss the official announcement for the full details.

About the Author

Rate this Article

Adoption
Style

BT