chapel-lang / chapel-lang/chapel-codespaces

Enable Codespaces prebuilds to speed up startup time

Open
#10 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Chapel
Stars
3
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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](https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-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

1. Go to Settings -> Codespaces for this repo.
2. Click Set up prebuild.
3. Select the `main` branch.
4. Choose one or more regions.
5. 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](https://docs.github.com/en/billing/concepts/product-billing/github-actions#free-use-of-github-actions)).
- **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

- [About Codespaces prebuilds](https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)
- [Configuring prebuilds](https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds)
- [Codespaces billing](https://docs.github.com/en/billing/concepts/product-billing/github-codespaces)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.