Repository navigation
Replies: 2 comments
|
Another recurring issue is in our version branches - 1.x, for instance. |
|
In my projects I had good experience with I would say:
|
|
Another recurring issue is in our version branches - 1.x, for instance. |
|
In my projects I had good experience with I would say:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Our CI installs sbt with
sbt/setup-sbt, and its signature verification step has now broken builds several times. I'd like to discuss replacing it, either withcoursier/setup-actionor with a small install step of our own.What happened this time
On 2026-11-06, jobs in #3751 started failing in
Install sbt, before sbt even started:We pin
sbt/setup-sbtto a commit SHA, but v1.5.13 fetches its verification policy from the default branch ofcarabiner-dev/policies. That policy added ameta.namefield which, according to the policy repo's commit messages, ampel versions before v1.3.10 can't parse. setup-sbt uses ampel v1.3.6.Three things made this worse:
sbt-runnercache entry later disappeared, probably through eviction, and jobs started failing.Nightly Multi JVM Testsrun onmainfailed with the same error. setup-sbt passesfail: false("monitor only"), but that doesn't stop this failure.setup-sbt v1.5.14 already fixes this by pinning the policy, and it was released before the breaking policy commit landed. We were still broken because Dependabot only checks weekly. So we need that update regardless of the outcome here. This discussion is about the longer term.
Earlier problems
All of these involve the same verification step:
ampel: command not foundon a cache miss, affecting several releases. The cause was a bug incarabiner-dev/actions(ampel/verify (used by setup-sbt) creates literal $HOME/.carabiner/bin/ directory carabiner-dev/actions#97), and setup-sbt releases still pinned a version from before the fix.carabiner-dev/actionsversion that failed to load on a self-hosted runner.The maintainers have fixed these quickly, and verifying the sbt download is a good goal. The concern is the size of the dependency chain for downloading one zip file. An install step now pulls in
carabiner-dev/actions, an ampel binary and a policy fetched at runtime. Any of those can stop every job in our CI, and other Pekko repos such aspekko-http,pekko-connectors,pekko-managementandpekko-grpcuse the same action.Option 1: use
coursier/setup-actionWe already use this action in
format.ymlandlink-validator.yml, it hasn't been a big problem for us, and it has no ampel or carabiner dependency. Its README shows installing sbt directly:Benefits:
pekko-http,pekko-connectors,pekko-managementandpekko-grpceach show a reference to it too.'*'entry withkeep: truefor this action, which as I read it means older pins won't expire.sbt/setup-sbtversions get anexpires_atdate, which adds to the backport churn on branches like 1.x.Costs and things to check:
requireChecksuminput, which checks the Coursier launcher against a SHA-256 pinned in the action, but only for the action's default Coursier version. We pin v3.0.4, which doesn't have it. It covers the launcher rather than the apps it installs.Proof of concept: apache/pekko-http#1401 makes this switch across that repo's workflows, using the v3.0.4 pin we already have. In its
Checksjob, the action rancs install --contrib sbt, thensbt checkCodeStylestarted sbt 1.13.1 and passed.Check headersandCode is formattedalso passed. TheCompile and testjobs were still running when I wrote this.Option 2: our own install step with curl
Add a small local composite action, such as
.github/actions/setup-sbt/action.yml, that downloads a fixed sbt runner version and checks it against a SHA-256 committed in our repo. sbt publishes.zip,.ascand.sha256files with each release. The runner is only a launcher, andproject/build.propertiesstill selects the sbt version used for the build.An untested sketch for Linux runners:
Benefits:
sbt/setup-sbtreferences across 39 workflow files onmain, which could all point at one action.Costs:
.ascat that point.actions/cacheor accept the extra requests.actions/checkout, so any workflow that installs sbt first would need reordering.apache/pekkoby SHA.Other alternatives
sbt/setup-sbtand update faster. This is the least work, but it keeps the dependency chain, and a cold cache can still turn an upstream problem into a repo-wide failure.fail: falsealready suggests this is meant to be monitor only, so it could help everyone using the action. We could do this alongside any other option.Questions
sbt/setup-sbt?.ascin CI?apache/pekkofirst, or be shared across the Pekko repos from the start?All reactions