Skip to content

Keep CI green when the Cachix cache is unreachable #547

Closed

Description

@hakula139

Goal

A Cachix outage should not fail CI when the build itself passed. Twice during the alpha.6 merges, a Nix job failed for cache reasons alone. The Set up Cachix step timed out on DNS while downloading its installer, and on macOS the action's post-step push failed with "Push manager drain timed out ... Failed to push some store paths" (cachix exit 3). Each failure also failed CI Result, which the ruleset requires, so a green build had to be rerun before it could merge. On main, the same failure would mark a release commit red.

Acceptance criteria

  • A failed or timed-out push to the binary cache leaves the job green and logs a warning.
  • A failed Cachix setup falls back to building without the cache, and does not fail the job.
  • Real build and check failures still fail the job and CI Result.
  • docs/conventions/development.md describes how CI treats cache failures.

Notes

The shared setup lives in .github/actions/setup-nix. Check what cachix/cachix-action offers for non-fatal pushes before wrapping it.

Activity

  1. added
    ci
    on Oct 22, 2026
  2. hakula139 commented on Oct 28, 2026

    @hakula139
    MemberAuthor

    The push-drain failure happened again, this time on Linux in the Lint job. In run 40649481586 (#719), attempt 1, every lint step passed, but the post-job Set up Nix Cachix push logged "Push manager drain timed out. Some jobs may not have completed." and "Failed to push some store paths", and cachix exited with code 3. That failed Lint and CI Result. The job passed when rerun with no change.

  3. added 2 commits that reference this issue on Oct 29, 2026
    47c5322
    1336cde
  4. hakula139 commented on Oct 29, 2026

    @hakula139
    MemberAuthor

    #764 meets the first criterion with one difference: a failed or timed-out push leaves the job green, but the log shows Cachix's own error-level annotation ("Action failed with error") in place of a warning.

    The push runs in cachix/cachix-action's post step, which GitHub runs after every step of the job. continue-on-error on the Cachix step keeps the failed post step from failing the job, but no step of ours can run after a post step to turn its error into a warning, and v17 of the action has no input that makes a push failure non-fatal. A warning would need the push in a separate final step of every Nix job with its own list of paths in place of the action's daemon, which pushes each build as it finishes. The error annotation on a green job tells the reader the same thing, so #764 keeps the action's push.

    A failed setup does log a warning, from a step that runs after it, and a failed download now builds the path from source through Nix's fallback setting.

  5. added a commit that references this issue on Oct 29, 2026
    ff8c073
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions