NixOS / NixOS/ofborg

Ensure tarball always builds when PR is green

Open
#291 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
323
Forks
171
PR merge metrics
No merged PRs in 30d

Description

I just had a case where I blocked the channel build accidently even though the PR was green: https://github.com/NixOS/nixpkgs/pull/52454

Would it be feasible to run some more checks, to make sure that the tarball always builds?
Building release.nix/tarball might be too much (requires lots of RAM for full jobset evaluation), but perhaps the following would work as check? (taken from pkgs/top-level/make-tarball.nix)

    # Check that all-packages.nix evaluates on a number of platforms without any warnings.
    for platform in i686-linux x86_64-linux x86_64-darwin; do
        header "checking Nixpkgs on $platform"

        nix-env -f . \
            --show-trace --argstr system "$platform" \
            -qa --drv-path --system-filter \* --system \
            "''${opts[@]}" 2>&1 >/dev/null | tee eval-warnings.log

        if [ -s eval-warnings.log ]; then
            echo "Nixpkgs on $platform evaluated with warnings, aborting"
            exit 1
        fi
        rm eval-warnings.log

        nix-env -f . \
            --show-trace --argstr system "$platform" \
            -qa --drv-path --system-filter \* --system --meta --xml \
            "''${opts[@]}" > /dev/null
        stopNest
    done

I can also implement this, if I can get a pointer where (which file) to start implementing this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the PR-green and channel-build workflow, then compare it with release.nix/tarball and the checks shown from pkgs/top-level/make-tarball.nix. Determine where tarball evaluation can run without full jobset evaluation; done means a green PR cannot block the channel build because the tarball check was omitted, and failures are reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
build-system, ci-cd, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.