Skip to content

Commit 295c9f5

Browse files
authored
Merge pull request #28324 from github/codespaces-prebuilds-ga
[06-15-2022] Codespace prebuilds GA (inc template history and failure notification)
2 parents 33c1fd7 + f80b9af commit 295c9f5

17 files changed

+26
-38
lines changed
24.5 KB
Loading
43.9 KB
Loading
6.01 KB
Loading
32.2 KB
Loading
-1.49 KB
Loading

content/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ If you purchased {% data variables.product.prodname_enterprise %} through a Micr
4242

4343
### Billing for {% data variables.product.prodname_codespaces %} prebuilds
4444

45-
{% data reusables.codespaces.prebuilds-beta-note %}
4645

4746
{% data reusables.codespaces.billing-for-prebuilds %}
4847

content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About Codespaces prebuilds
33
shortTitle: About prebuilds
4-
intro: Codespaces prebuilds help to speed up the creation of new codespaces.
4+
intro: Codespaces prebuilds help to speed up the creation of new codespaces for large or complex repositories.
55
versions:
66
fpt: '*'
77
ghec: '*'
@@ -10,15 +10,13 @@ topics:
1010
product: '{% data reusables.gated-features.codespaces %}'
1111
---
1212

13-
{% data reusables.codespaces.prebuilds-beta-note %}
14-
1513
## Overview
1614

17-
Prebuilding your codespaces allows you to be more productive and access your codespace faster, regardless of the size and complexity of your project. This is because any source code, editor extensions, project dependencies, commands, and configurations have already been downloaded, installed, and applied before you create a codespace for your project. Think of a prebuild as a "ready-to-go" template for a codespace.
15+
Prebuilding your codespaces allows you to be more productive and access your codespace faster, particularly if your repository is large or complex and new codespaces currently take more than 2 minutes to start. This is because any source code, editor extensions, project dependencies, commands, and configurations have already been downloaded, installed, and applied before you create a codespace for your project. Think of a prebuild as a "ready-to-go" template for a codespace.
1816

1917
By default, whenever you push changes to your repository, {% data variables.product.prodname_codespaces %} uses {% data variables.product.prodname_actions %} to automatically update your prebuilds.
2018

21-
When prebuilds are available for a particular branch of a repository, and for your region, you'll see the "{% octicon "zap" aria-label="The zap icon" %} Prebuild ready" label in the list of machine type options when you create a codespace. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)."
19+
When prebuilds are available for a particular branch of a repository, and for your region, you'll see the "{% octicon "zap" aria-label="The zap icon" %} Prebuild ready" label in the list of machine type options when you create a codespace. If a prebuild is still being created, you will see the "{% octicon "history" aria-label="The history icon" %} Prebuild in progress" label. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)."
2220

2321
![The dialog box for choosing a machine type](/assets/images/help/codespaces/choose-custom-machine-type.png)
2422

content/codespaces/prebuilding-your-codespaces/configuring-prebuilds.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ product: '{% data reusables.gated-features.codespaces %}'
1313
permissions: People with admin access to a repository can configure prebuilds for the repository.
1414
---
1515

16-
{% data reusables.codespaces.prebuilds-beta-note %}
17-
1816
You can set up a prebuild configuration for a specific branch of your repository.
1917

2018
Any branch created from a prebuild-enabled base branch will typically also get assigned a prebuild during codespace creation. This is true if the dev container on the branch is the same as on the base branch. This is because the majority of the prebuild configuration for branches with the same dev container configuration are identical, so developers can benefit from faster codespace creation times on those branches also. For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)."
@@ -38,7 +36,7 @@ Before you can configure prebuilds for your project the following must be true:
3836

3937
![The 'Set up prebuilds' button](/assets/images/help/codespaces/prebuilds-set-up.png)
4038

41-
1. Choose the branch for which you want to set up a prebuild.
39+
1. Choose the branch for which you want to set up a prebuild.
4240

4341
![The Branch drop-down menu](/assets/images/help/codespaces/prebuilds-choose-branch.png)
4442

@@ -48,7 +46,15 @@ Before you can configure prebuilds for your project the following must be true:
4846

4947
{% endnote %}
5048

51-
1. Choose the regions in which you want to set up a prebuild. Developers must be located in a region you select to be able to create codespaces from a prebuild. Alternatively, select **All regions**.
49+
1. Choose how you want to automatically trigger updates of the prebuild template.
50+
51+
* **Every push** (the default setting) - With this setting, prebuild configurations will be updated on every push made to the given branch. This will ensure that codespaces generated from a prebuild template always contain the latest codespace configuration, including any recently added or updated dependencies.
52+
* **On configuration change** - With this setting, prebuild configurations will be updated every time associated configuration files for a given repo and branch are updated. This ensures that changes to the dev container configuration files for the repository are used when a codespace is generated from a prebuild template. The Actions workflow that updates the prebuild template will run less often, so this option will use fewer Actions minutes. However, this option will not guarantee that codespaces always include recently added or updated dependencies, so these may have to be added or updated manually after a codespace has been created.
53+
* **Scheduled** - With this setting, you can have your prebuild configurations update on a custom schedule that's defined by you. This can reduce consumption of Actions minutes, however, with this option, codespaces may be created that do not use the latest dev container configuration changes.
54+
55+
![The prebuild trigger options](/assets/images/help/codespaces/prebuilds-triggers.png)
56+
57+
1. Select **Reduce prebuild available to only specific regions** to limit access to your prebuilt image, then select which regions you want it available in. Developers can only create codespaces from a prebuild if they are located in a region you select. By default, your prebuilt image is available to all regions where codespaces is available and storage costs apply for each region.
5258

5359
![The region selection options](/assets/images/help/codespaces/prebuilds-regions.png)
5460

@@ -60,13 +66,17 @@ Before you can configure prebuilds for your project the following must be true:
6066

6167
{% endnote %}
6268

63-
1. Choose how you want to automatically trigger updates of the prebuild template.
69+
1. Set the number of prebuild template versions to be retained. You can input any number between 1 and 5. The default number of saved versions is 2, which means that only the latest template version and the previous version are saved.
6470

65-
* **Every push** (the default setting) - With this setting, prebuild configurations will be updated on every push made to the given branch. This will ensure that codespaces generated from a prebuild template always contain the latest codespace configuration, including any recently added or updated dependencies.
66-
* **On configuration change** - With this setting, prebuild configurations will be updated every time associated configuration files for a given repo and branch are updated. This ensures that changes to the dev container configuration files for the repository are used when a codespace is generated from a prebuild template. The Actions workflow that updates the prebuild template will run less often, so this option will use fewer Actions minutes. However, this option will not guarantee that codespaces always include recently added or updated dependencies, so these may have to be added or updated manually after a codespace has been created.
67-
* **Scheduled** - With this setting, you can have your prebuild configurations update on a custom schedule that's defined by you. This can reduce consumption of Actions minutes, and reduce the amount of time during which prebuilds are unavailable because they are being updated. However, with this option, codespaces may be created that do not use the latest dev container configuration changes.
71+
Depending on your prebuild trigger settings, your prebuild template could change with each push or on each dev container configuration change. Retaining older versions of prebuild templates enables you to create a prebuild from an older commit with a different dev container configuration than the current prebuild template. Since there is a storage cost associated with retaining prebuild template versions, you can choose the number of versions to be retained based on the needs of your team. For more information on billing, see "[About billing for {% data variables.product.prodname_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)."
6872

69-
![The prebuild trigger options](/assets/images/help/codespaces/prebuilds-triggers.png)
73+
If you set the number of prebuild template versions to save to 1, {% data variables.product.prodname_codespaces %} will only save the latest version of the prebuild template and will delete the older version each time the template is updated. This means you will not get a prebuilt codespace if you go back to an older dev container configuration.
74+
75+
![The prebuild template history setting](/assets/images/help/codespaces/prebuilds-template-history-setting.png)
76+
77+
1. Add users or teams to notify when the prebuild workflow run fails for this configuration. You can begin typing a username, team name, or full name, then click the name once it appears to add them to the list. The users or teams you add will receive an email when prebuild failures occur, containing a link to the workflow run logs to help with further investigation.
78+
79+
![The prebuild failure notification setting](/assets/images/help/codespaces/prebuilds-failure-notification-setting.png)
7080

7181
1. Click **Create**.
7282

content/codespaces/prebuilding-your-codespaces/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ children:
1515
- /managing-prebuilds
1616
- /testing-dev-container-changes
1717
---
18-
19-
{% data reusables.codespaces.prebuilds-beta-note %}
18+

content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ product: '{% data reusables.gated-features.codespaces %}'
1212
miniTocMaxHeadingLevel: 3
1313
---
1414

15-
{% data reusables.codespaces.prebuilds-beta-note %}
16-
1715
## Checking, changing, and deleting your prebuild configurations
1816

1917
The prebuilds that you configure for a repository are created and updated using a {% data variables.product.prodname_actions %} workflow, managed by the {% data variables.product.prodname_codespaces %} service.

0 commit comments

Comments
 (0)