We’re excited to announce that the ability to pre-build codespaces is now available to everyone. As a quick recap, a pre-built codespace serves as a “ready to go” template where your source code, editor extensions, project dependencies, commands, and configurations have already been downloaded, installed, and applied. , so you don’t have to wait for these tasks to complete each time you create a new codespace. This can significantly speed up the creation of codespaces, especially for complex or large codebases.
The Codespaces pre-builds entered public beta earlier this year, and we got a ton of feedback on the experiences you liked, as well as areas we could improve. We are delighted to share them with you today.
How Vanta doubled its engineering team with Codespaces
With Codespaces pre-builds, Vanta was able to drastically reduce the time it takes for a developer to onboard. This was significant, as Vanta’s engineering team has doubled in size over the past few months. When a new developer joined the company, they had to manually set up their development environment; and once stable, diverged within weeks, often making testing difficult.
“Before Codespaces, the integration process was tedious. Instead of taking two days, it now only takes a minute for a developer to access a pristine, stable environment, thanks to pre-builds,” said Robbie Ostrow, Software Engineering Manager at Vanta. “Now our development environments are ephemeral, always updated and ready to go.”
Planned pre-builds to manage the use of GitHub actions
Repository administrators can now decide how and when they want to update pre-build configurations based on their team’s needs. When creating or updating pre-builds for a given repository and branch, admins can choose from three available triggers to initiate a pre-build refresh:
- Each push (default): Pre-build configurations are updated on every push to the given branch. This ensures that new Codespaces always contain the latest configuration, including any recently added or updated dependencies.
- During a configuration change: Pre-build configurations are updated whenever configuration files change. This ensures that the latest configuration changes appear in the new Codespaces. The Actions workflow that generates the pre-build model will run less often, so this option will use fewer Actions minutes.
- Program: With this setting, you can update your pre-build configurations on a custom schedule. This can help further reduce the consumption of action minutes.
With increased control, repository administrators can make more nuanced trade-offs between “environment freshness” and action usability. For example, an administrator working in a large organization might decide to update their pre-build configuration every hour rather than every push to get the most economy and efficiency from their use of actions. .
Failure notifications for effective monitoring
Many of you have shared with us the need to be notified when a pre-build workflow fails, primarily to be able to monitor and fix issues if they arise. We heard you loud and clear and added support for failure notifications in pre-builds. With this, repository admins can specify a set of individuals or teams to be notified via email if a workflow associated with this pre-build configuration fails. This will allow team leaders or developers in charge of managing their repository’s pre-builds to keep abreast of any failures without having to manually monitor them. It will also allow them to make fixes faster, ensuring that developers working on the project continue to get pre-built codespaces.
To help investigate failures, we’ve also added the ability to disable a pre-build configuration in the instance repository. Admins want to temporarily suspend updating a pre-build model while fixing an underlying issue.
Improved “readiness for construction” indicators
Finally, to help you identify pre-build compatible machine types for fast builds, we’ve introduced a “pre-build in progress” tag in addition to the “pre-build ready” tag in the case where the creation of a pre-build model for a given branch is in progress.
Invoicing of pre-constructions
With general availability, organizations will be charged for minutes of action required to run the workflows associated with pre-construction and model storage associated with each pre-build configuration for a given repository and region. As an administrator, you can download your organization’s usage report to get a detailed view of prebuild-related actions and storage costs for repositories owned by your organization to help you manage usage.
In addition to enabling billing, we’ve also added functionality to help manage storage costs associated with pre-build based on the valuable feedback you’ve shared with us.
Retention of models to manage storage costs
Repository administrators can now specify the number of pre-build model versions to keep with a default model retention setting of two. A default value of two means that the codespace service will keep the most recent version and the previous version of the pre-build model by default, helping you save on storing older versions.
Pre-builds are generally available for GitHub Enterprise Cloud and GitHub Team plans starting today.
As an organization or repository admin, you can access your repository’s settings page and create pre-build configurations under the “Codespaces” tab. As a developer, you can create a pre-built codespace by heading to a pre-build compatible branch in your repository and selecting a machine type labeled “pre-build ready”.
Here is a link to the documentation of pre-constructions to help you get started!
After GA, we will continue to work on features to enable pre-builds on single-repository and multi-repository scenarios based on your feedback. If you have any feedback to help improve this experience, be sure to post it on our GitHub Discussion forum.