From 6a5d7400d02a75cf94cd7fe45928a076010947c3 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwari Date: Sat, 17 Oct 2026 13:10:46 +0100 Subject: [PATCH 1/3] Run dependency cache benchmarks with a candidate CLI artifact A manual dependency cache run can now take the id of a BoringCache artifact holding an unreleased CLI build. The installer installs the pinned release, pulls the artifact through the job's OIDC session and replaces the binary. Runs with a candidate never publish results. --- .github/workflows/deps.yml | 9 ++++++++- scripts/install-boringcache.sh | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 2c98a1a502..e2aa69db60 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -16,9 +16,16 @@ on: description: only this case, for example discourse-bundler (optional) type: string default: "" + cli_artifact: + description: BoringCache artifact id of a candidate CLI to run instead of the pinned release; never recorded (optional) + type: string + default: "" run-name: Dependency cache update step ${{ inputs.step }}${{ inputs.case && format(' {0}', inputs.case) || '' }}${{ inputs.mode == 'preflight' && ' (preflight)' || '' }} +env: + CANDIDATE_CLI_ARTIFACT: ${{ inputs.cli_artifact }} + concurrency: group: cache-deps cancel-in-progress: false @@ -133,7 +140,7 @@ jobs: publish: needs: [plan, seed, update, verify] - if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' && inputs.mode == 'run' }} + if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' && inputs.mode == 'run' && inputs.cli_artifact == '' }} runs-on: ubuntu-24.04 permissions: contents: write diff --git a/scripts/install-boringcache.sh b/scripts/install-boringcache.sh index d7fa0cafb4..41f353ddfa 100644 --- a/scripts/install-boringcache.sh +++ b/scripts/install-boringcache.sh @@ -14,4 +14,11 @@ cd "$dir" curl --fail --silent --show-error --location --retry 3 --remote-name-all "$base/SHA256SUMS" "$base/$asset" grep " $asset\$" SHA256SUMS | sha256sum --check install -m 0755 "$asset" "$dir/boringcache" +if [ -n "${CANDIDATE_CLI_ARTIFACT:-}" ]; then + candidate="$RUNNER_TEMP/boringcache-candidate" + "$dir/boringcache" ci run --oidc-provider github-actions -- \ + "$dir/boringcache" artifact pull "$CANDIDATE_CLI_ARTIFACT" "$candidate" --workspace boringcache/benchmarks + install -m 0755 "$candidate/$asset" "$dir/boringcache" + "$dir/boringcache" --version +fi echo "$dir" >> "$GITHUB_PATH" From 688b11de8a893ea507bb4ee0409eee4a784c3364 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwari Date: Sat, 17 Oct 2026 21:32:02 +0100 Subject: [PATCH 2/3] Add a Mastodon bundler dependency case Mastodon pins Ruby 4.0.7 and builds pg, charlock_holmes and idn-ruby, so its gem set differs from Discourse. The update step is an upstream net-ldap bump. --- deps/plan.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/deps/plan.toml b/deps/plan.toml index e455111b66..97e925dcbb 100644 --- a/deps/plan.toml +++ b/deps/plan.toml @@ -47,3 +47,19 @@ steps = [["bab418487a463eede4c7d2f6415fe2eb966a3883", "bbb722e4322eba62306788b6d BUNDLE_PATH = "vendor/bundle" BUNDLE_DEPLOYMENT = "true" BUNDLE_WITHOUT = "development" + +[cases.mastodon-bundler] +repo = "mastodon/mastodon" +tool = "bundler" +ruby = "4.0.7" +lockfile = "Gemfile.lock" +path = "upstream/vendor/bundle" +apt = ["libpq-dev", "libicu-dev", "libidn-dev", "libyaml-dev"] +install = "bundle install --jobs 4" +check = "bundle check" +steps = [["85cc1449181c774a226ae42ec19dca3a2f7cce26", "bcbf3651da6d2e9d9e7966e8e97fb59bbe7665e0"]] + +[cases.mastodon-bundler.env] +BUNDLE_PATH = "vendor/bundle" +BUNDLE_DEPLOYMENT = "true" +BUNDLE_WITHOUT = "development" From f41dcf3bd2c1417360610334d71d9a48b8038daf Mon Sep 17 00:00:00 2001 From: Gaurav Tiwari Date: Sat, 17 Oct 2026 14:25:13 +0100 Subject: [PATCH 3/3] Keep BoringCache CLI JSONL from dependency cache runs on request A manual run with cli_jsonl writes the CLI's observability JSONL into each job's results artifact so restore phases can be compared between CLI builds. Such runs are never published. --- .github/workflows/deps.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index e2aa69db60..c2191bd454 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -20,11 +20,16 @@ on: description: BoringCache artifact id of a candidate CLI to run instead of the pinned release; never recorded (optional) type: string default: "" + cli_jsonl: + description: keep BoringCache CLI JSONL in each job's results artifact; never recorded + type: boolean + default: false run-name: Dependency cache update step ${{ inputs.step }}${{ inputs.case && format(' {0}', inputs.case) || '' }}${{ inputs.mode == 'preflight' && ' (preflight)' || '' }} env: CANDIDATE_CLI_ARTIFACT: ${{ inputs.cli_artifact }} + BORINGCACHE_OBSERVABILITY_JSONL_PATH: ${{ inputs.cli_jsonl && format('{0}/deps-results/boringcache.jsonl', github.workspace) || '' }} concurrency: group: cache-deps @@ -140,7 +145,7 @@ jobs: publish: needs: [plan, seed, update, verify] - if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' && inputs.mode == 'run' && inputs.cli_artifact == '' }} + if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' && inputs.mode == 'run' && inputs.cli_artifact == '' && !inputs.cli_jsonl }} runs-on: ubuntu-24.04 permissions: contents: write