Creating a new Codespace from this repository currently takes ~2 minutes because the dev container has to be set up from scratch each time (pulling the Chapel Docker image, installing extensions, etc.). For users who want to quickly try Chapel, this wait can be discouraging.
I want to consider using Codespaces prebuilds for the main branch. With a prebuild, GitHub builds and caches a snapshot of the dev container ahead of time. When a user creates a Codespace, it restores from the snapshot instead of rebuilding, which based on my understanding, should result in dropping startup to ~10–30 seconds.
Setup
- Go to Settings -> Codespaces for this repo.
- Click Set up prebuild.
- Select the
main branch.
- Choose one or more regions.
- Set the trigger to On push (or On configuration change if preferred).
Cost (I'm not sure about this)
- GitHub Actions minutes to build the prebuild: Supposed to be free for public repositories (see Actions billing docs).
- Codespaces storage for the cached snapshot: This looks like it costs money, but its at $0.07/GB-month. In practice the cost should be negligible ($0.70/month if the image is 10GB) because:
- Only one prebuild for the
main branch.
- The dev container configuration only changes when a new Chapel release comes out (~every 3 months), so the prebuild workflow rarely runs (I mean the actions are free anyway, we can also rebuild whenever there is a new version of the chapel extension)
- Each new prebuild overwrites the previous snapshot, so storage doesn't accumulate.
Chapel may already have open source credits or a GitHub partnership that covers this — worth checking with our GitHub account contact.
References
Creating a new Codespace from this repository currently takes ~2 minutes because the dev container has to be set up from scratch each time (pulling the Chapel Docker image, installing extensions, etc.). For users who want to quickly try Chapel, this wait can be discouraging.
I want to consider using Codespaces prebuilds for the
mainbranch. With a prebuild, GitHub builds and caches a snapshot of the dev container ahead of time. When a user creates a Codespace, it restores from the snapshot instead of rebuilding, which based on my understanding, should result in dropping startup to ~10–30 seconds.Setup
mainbranch.Cost (I'm not sure about this)
mainbranch.Chapel may already have open source credits or a GitHub partnership that covers this — worth checking with our GitHub account contact.
References