Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This context covers the checks that verify a change, and the machines that run t
The context covers the GitHub Actions workflows of `cipherstash/stack`.
The context also covers the CI spending of the other repositories that share the CI budget with `cipherstash/stack`.

The entries below name two services that run CI jobs.
Blacksmith provides hosted machines that GitHub Actions jobs run on.
RunsOn starts a new machine in our AWS account for each job.

## Language

**CI budget**:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Mutants, the mutation testing workflow, uses a c8a machine with 16 vCPUs.
The other repositories that share the CI budget move their Blacksmith jobs to RunsOn too.

Heavy jobs stay on x64 machines.
In the trial, arm64 machines were slower than x64 machines, and not cheaper.
In the runner trial in pull request #1297, arm64 machines were slower than x64 machines, and not cheaper.
Jobs that must run on arm64, such as native arm64 container image builds, are the exception.
Those jobs run on RunsOn's arm64 machines.

Expand Down Expand Up @@ -47,8 +47,8 @@ We rejected each of these options:
Light jobs would then cost money.
GitHub-hosted runners run them for nothing.
- **Run every job on GitHub-hosted runners.**
In the runner trial in pull request #1297, jobs took 2.46 times as long overall.
The integration suites took up to 4.8 times as long.
In the same trial, jobs took 2.46 times as long overall as on Blacksmith.
The integration suites took up to 4.8 times as long as on Blacksmith.
- **Build arm64 images on x64 machines.**
Cross-compiling Rust for another architecture is slow.
- **Run arm64 jobs on GitHub-hosted arm64 runners.**
Expand All @@ -73,7 +73,7 @@ We rejected each of these options:
The full price is more than twice the spot price.
The `family=c8a+m8a` label lets RunsOn try a second machine type before the job runs at the full price.
- Every job sets `timeout-minutes`.
In the trial, one job without a limit ran for more than 2 hours.
In the runner trial in pull request #1297, one job without a limit ran for more than 2 hours.
- We maintain the RunsOn resources in AWS.
Those resources cost $40 to $60 a month.
- Each RunsOn machine has its own public address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: accepted
# Merge queues on `main` and `next` run expensive CI checks

> We paused work on this decision in November 2026, until the same-size swap in architecture decision record (ADR) 0004 is in place.
> That swap moves every Blacksmith job in this repository to a RunsOn machine of the same size.
> That swap moves every Blacksmith job in this repository to a cheaper RunsOn machine of the same size.
> None of this decision has been built yet.

In October 2026, we decided to split this repository's CI checks into push checks and gate checks.
Expand All @@ -16,9 +16,11 @@ The `main` and `next` branches each get a merge queue.
We made the change because of cost.
From 1 to 20 October 2026, 89% of this repository's CI spending came from runs for pull requests.
Each push to a pull request ran the expensive checks again.
ADR 0002 moves jobs to cheaper machines.
This decision runs the expensive checks less often.

ADR 0002 planned to move jobs to cheaper machines.
ADR 0004 has since superseded ADR 0002.

The glossary in `.github/CONTEXT.md` defines the terms used here.
The diagram shows each step for one pull request, from a push to the merge.

Expand Down Expand Up @@ -66,7 +68,9 @@ The queue commit of an entry contains the entry ahead, plus that entry's pull re
When we made this decision, `next` had no protection.
Pushes to `next` ran no workflows.
- Each queue builds at most 3 entries at once.
The weekly cost report will show whether to change that limit.
A weekly CI cost report is planned.
Nobody has built the report yet.
Once the report exists, it will show whether to change that limit.
- The queues merge with merge commits, as `main` did when we made this decision.
The selector job compares each queue commit with the entry ahead.
The comparison needs merge commits or squash merges.
Expand Down
13 changes: 10 additions & 3 deletions docs/adr/0004-same-size-swap-from-blacksmith-to-runs-on.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Each Blacksmith label becomes a RunsOn label with the same vCPU count and Ubuntu
The c8a machines have 2 GB per vCPU.
Blacksmith's x64 machines have 4 GB per vCPU.
A job that fails for lack of memory moves to `family=m8a`.
The log of such a job shows exit code 137, "Killed", or "signal: 9, SIGKILL".
The m8a machines have 4 GB per vCPU.
- **Disk.**
Every job gets an 80 GB disk.
Expand Down Expand Up @@ -71,9 +72,13 @@ Two changes go in with the swap, because RunsOn needs them:
On RunsOn, a stuck job costs money until its time limit ends it.
In the trial, one job without a limit ran for more than 2 hours.

## The RunsOn setup
## The RunsOn setup on 19 November 2026

These settings are in place in the AWS account, or have been requested:
This section records the RunsOn setup on 19 November 2026.
Two of these items were requests that AWS had not answered on that date.
The AWS Service Quotas console shows the current vCPU quotas.

These settings were in place in the AWS account, or had been requested:

- We upgraded RunsOn to v3.6.2 on 19 November 2026.
Before v3.6.0, RunsOn failed a job when the on-demand vCPU quota was full.
Expand All @@ -89,6 +94,8 @@ These settings are in place in the AWS account, or have been requested:
Jobs above the quotas wait.
The swap does not wait for the approval.
- When AWS raises the `RunInstances` request rate from 2 to 4 a second, the RunsOn `AppSize` setting moves from `small` to `medium`.
The Service Quotas code for that rate is `L-A2D70E6C`.
Once Service Quotas shows 4 for that code, a second CloudFormation change set moves `AppSize`.
We asked AWS for the higher rate on 19 November 2026.
Both sizes cost the same.

Expand Down Expand Up @@ -120,7 +127,7 @@ We rejected each of these options:
AWS would never interrupt a job.
The cost would be about 2.3 times the spot price.
- **Keep warm machines ready.**
Jobs would start faster.
Jobs would start faster, because they would not wait for a new machine to boot.
Warm machines cost money while idle.
- **Pay for a Docker Team or Pro plan.**
Either plan removes the pull limit.
Expand Down
Loading
Loading