Skip to content

DO NOT MERGE: [#3019] green run, sccache startup timeout with the fallback - #3034

Closed
josecelano-bot wants to merge 4 commits into
torrust:developfrom
josecelano-bot:3019-verify-green
Closed

josecelano-bot wants to merge 4 commits into
torrust:developfrom
josecelano-bot:3019-verify-green

Conversation

@josecelano-bot

Copy link
Copy Markdown
Contributor

Do not merge. Throwaway verification PR for #3019; it will be closed after its checks run.

This is the green run of the hosted verification in the #3019 spec (scenario M4, evidence V4). The josecelano-bot fork starts no workflow runs, so the maintainer chose throwaway draft PRs for the forced-timeout runs instead of fork branches.

The branch is the #3019 implementation branch (the enable-sccache composite action) plus the same temporary commit as the red PR: a step in the unit job of testing.yaml writes server_startup_timeout_ms = 1 to an sccache config file and exports SCCACHE_CONF, forcing the sccache server startup timeout.

Expected result: both Unit jobs build without sccache and pass, and the run shows the sccache disabled warning annotation. The temporary commit is not part of the implementation PR.

Refs #3019

🤖 Generated with Claude Code

josecelano-bot and others added 4 commits November 24, 2026 13:08
Add the local composite action .github/actions/enable-sccache and use it in
the nine Enable sccache steps. It starts the sccache server with the GitHub
Actions cache backend and no idle timeout, and sets RUSTC_WRAPPER only when
the server started. Otherwise the job builds without the cache and shows a
warning annotation instead of failing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e sccache startup fallback

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ut (fork verification only)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@josecelano-bot

Copy link
Copy Markdown
Contributor Author

Green run done: both Unit jobs passed with the forced timeout and showed the sccache disabled warning (run https://github.com/torrust/torrust-tracker/actions/runs/45444371578). Recorded as V4 in the #3019 evidence. Closing this throwaway PR; the fork branch 3019-verify-green is deleted too.

@josecelano-bot

Copy link
Copy Markdown
Contributor Author

Correction: the fork branch was not deleted (the bot wrapper does not allow it). It stays in josecelano-bot/torrust-tracker until someone with access removes it.

josecelano added a commit that referenced this pull request Nov 25, 2026
…oes not start

6ef7064 docs(issues): [#3019] record the normal hosted run of PR 3040 (josecelano-bot)
2cde16f docs(issues): [#3019] record the hosted red and green runs of the sccache startup fallback (josecelano-bot)
096c3b9 docs(issues): [#3019] run the forced-timeout checks on throwaway draft PRs (josecelano-bot)
b35186e docs(issues): [#3019] record the implementation progress of the sccache startup fallback (josecelano-bot)
277cf1d docs(adrs): [#3019] amend the sccache ADR with the startup fallback (josecelano-bot)
4988f59 ci: [#3019] build without sccache when its server does not start (josecelano-bot)

Pull request description:

  ## Summary

  Bare CI builds now keep building, without the compilation cache, when the `sccache` server does not start. Before this change, a slow GitHub Actions cache service made the server miss sccache's 10-second startup timeout, and the first `cargo` command failed the job with `sccache: error: Timed out waiting for server startup` (four jobs on 2026-11-23).

  ## Changes

  - New local composite action `.github/actions/enable-sccache`, run after `mozilla-actions/sccache-action`:
    - runs `sccache --start-server` with `SCCACHE_GHA_ENABLED=true` and `SCCACHE_IDLE_TIMEOUT=0`, because the server selects its cache backend when it starts;
    - on success, exports `RUSTC_WRAPPER=sccache`, `SCCACHE_GHA_ENABLED=true` and `SCCACHE_IDLE_TIMEOUT=0` (the server then lives for the whole job, so no later compile starts one without this check);
    - on failure, stops any late server, exports nothing for sccache and shows a `sccache disabled` warning annotation;
    - exports `CARGO_INCREMENTAL=0` in both cases. It uses `shell: bash`, so it also runs on the `windows-latest` jobs.
  - The nine `Enable sccache` steps in `testing.yaml`, `os-compatibility.yaml`, `db-compatibility.yaml`, `coverage.yaml` and `db-benchmarking.yaml` use the action. The `docker-e2e` `if:` condition is kept.
  - `db-compatibility.yaml` and `db-benchmarking.yaml` also list `.github/actions/enable-sccache/**` in their path filters, so a change to the action runs them.
  - The sccache ADR has an amendment with the fallback, and why `SCCACHE_IGNORE_SERVER_IO_ERROR` (it does not cover the startup path in sccache v0.20.0) and retries were not used.
  - The issue spec and its manual verification evidence are updated.

  ## Verification

  - Local: `linter all` and the pre-commit gate pass. The timeout and the fallback were reproduced locally with a real sccache (V1, V2).
  - Hosted red (V3), throwaway draft PR #3033 (closed), with a temporary step that forces `server_startup_timeout_ms = 1`: `Unit (nightly)` failed with `Timed out waiting for server startup` on the current workflow.
  - Hosted green (V4), throwaway draft PR #3034 (closed), the same temporary step on top of this branch: both `Unit` jobs passed and showed the `sccache disabled` warning.
  - The temporary commits are not part of this PR. The `josecelano-bot` fork starts no workflow runs, so the maintainer chose the draft PRs instead of fork branches.
  - Normal run (V5): this PR's checks, with the sccache stats of the jobs.
  - Not covered by this PR's checks (V6, after the merge): `coverage.yaml` runs on the merge push to `develop`, and `docker-e2e` runs its sccache steps only for a Dependabot branch push.

  Closes #3019

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

  <!-- coderabbit-ai-generated:v1 -->

  ## Summary by CodeRabbit

  * **CI Improvements**
    * Standardized build caching across CI workflows. Builds now continue without the cache if the cache service fails to start, with a warning instead of a failed job.
    * Updated workflow triggers so changes to the shared caching setup are covered by relevant checks.
  * **Documentation**
    * Documented the fallback behavior and recorded verification results; some post-merge checks remain pending.

  <!-- end of auto-generated comment: release notes by coderabbit.ai -->

ACKs for top commit:
  josecelano:
    ACK 6ef7064
  da2ce7:
    ACK 6ef7064 — the composite action replaces all nine sccache enable steps with a checked server start and a warning fallback, and the workflow, ADR and spec claims recompute at this head apart from three non-blocking Nits

Tree-SHA512: 29d0b2876f56b0829c29ffffc2cab17dde2850f4b69ec3159f44faa3bc6473b454bf7a9c0360ce266f1e074e78f6e3a6421014409cb7246077ff690b7c0886d0
@josecelano-bot
josecelano-bot deleted the 3019-verify-green branch November 25, 2026 16:33

This branch was previously deployed

1 inactive deployment
coverage — 397507f7 Deployed Nov 24, 2026 by josecelano-bot via Generate Coverage Report #3459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant