Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NixOS 24.11 - Zero Hydra Failures #352882

Open
RossComputerGuy opened this issue Nov 1, 2024 · 1 comment
Open

NixOS 24.11 - Zero Hydra Failures #352882

RossComputerGuy opened this issue Nov 1, 2024 · 1 comment
Labels
0.kind: build failure A package fails to build 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems 6.topic: release process Issues or PRs which are parts of the NixOS release process

Comments

@RossComputerGuy
Copy link
Member

RossComputerGuy commented Nov 1, 2024

Hello, this is your NixOS 24.11 ("Vicuna") release managers, Tristan Ross & Weijia Wang.

Today kicks off our CI failure mitigation party known as Zero Hydra Failures (ZHF). The goal is to reduce the amount of Hydra failures as much as possible before the release on November 22nd. I hope to see many builds fixed, especially relating to aarch64-linux and both Darwin systems (especially after the rework).

There's two important dates which are related:

  • 2024-11-14: Branch off
  • 2024-11-22: 24.11 release

Full timeline is at: #339153

The mission

Every time we plan to do a release, we take time to stabilize the master branch and later on the release branch. Our goal here is to reduce the number of failing jobs on the nixpkgs:trunk nixos:trunk-combined jobsets as much as possible before branch-off. We call this the "Zero Hydra Failure" campaign.

Besides aiming for zero failed jobs, we also strive to again provide all packages that were available in the previous release.

Changes need to always target the master branch. Take note that the branch-off will occur on 2024-11-14, after which ZHF changes will need to be tagged with the backport: release-24.11 label to land in the stable release.

Jobsets

The relevant jobsets to check for failing jobs are:

Workflow

Finding broken packages

Eval reports

Evaluation reports provide a structural overview of the most impactful failing builds. They originated at https://github.com/nix-community/nix-review-tools and were automated over at https://github.com/malob/nix-review-tools-reports.

  1. Navigate to https://malob.github.io/nix-review-tools-reports/
  2. Open the relevant jobset
  3. Browse the latest reports for build failures
  4. Follow the links to the build failure on hydra

ZERO Hydra Failures

The platform automatically crawls Hydra and lists packages by maintainer and lists the most important dependencies (failing packages with the most dependants). It also graphs the general trend per platform.

  1. Navigate to https://zh.fail

For the record, we started ZHF here:

Latest Linux evaluation (completely built):	1809719 on 2024-11-01 08:02:16 (UTC)
Latest Darwin evaluation (completely built):	1809682on 2024-10-31 05:59:10 (UTC)
Failing builds on aarch64-darwin:	1541
Failing builds on aarch64-linux:	1554
Failing builds on x86_64-darwin:	1701
Failing builds on x86_64-linux:	2058
Total failed builds	6854

Check on packages you maintain

  1. Clone nixpkgs and checkout the master branch
  2. Run
    nix-build maintainers/scripts/build.nix --argstr maintainer <name>
    

Hydra

Hydra is nixpkgs CI platform, where all active branches are built and pushed into the cache, after which channels can originate from its build results.

  1. Open the nixpkgs:trunk jobset
  2. Select the latest evaluation
  3. Directly failing jobs are marked with a red cross, while transitively failing ones are greyed out.
  4. Use the search form to scope the package list to things relevant to you and that you can test.

Submit fixes

  1. Search through PRs to make sure noone provided a fix yet. If there is one, please take the time and help review the change.

  2. If there is no open PR, troubleshoot why it's failing and fix it.

  3. Pull Request the fix against the master branch and wait potential review & change requests

    • If your PR causes more than ~500 rebuilds, it is generally preferred to target staging to avoid compute churn for users on master.

Backporting

After 2024-11-22

  1. Apply the relevant backport label to land the fix in the release branch

    • Changes to master get backported into release-24.11
    • Changes to staging get backported into staging-24.11
  2. If the backport action fails, follow the manual backporting steps. Make sure to use git cherry-pick -x <rev> on all commits intended for backport.


Always link back to this issue by mentioning the issue number in the description of your pull request:

ZHF: #352882

If your PR receives no reviews or does not get merged, feel free to

  • add the 0.kind: ZHF Fixes label, so people can better browse these fixes
  • request or mention @NixOS/nixos-release-managers on the PR

Broken packages

Everything we cannot fix in time will need to be marked broken on the respective platforms, so that Hydra will not retry builds over and over, thereby wasting compute resources.

Set meta.broken and add a reference and/or explanation, like this:

meta = {
  # ref to issue/explanation
  broken = stdenv.isDarwin; # only broken on darwin
  # broken = true; # broken on all platforms.
};

Orphaned Packages

You can read about failing packages without a maintainer here: https://zh.fail/failed/by-maintainer/_.html (orphaned packages).

If you're new to NixOS, adopting an orphaned package is a great way to get involved and contribute to the community. By doing so, you'll not only help improve the overall quality of the NixOS ecosystem, but you'll also gain valuable experience working with Nix, the language and tool that powers the package management system.

By adopting an orphaned package, you'll be taking on a responsibility that can be both challenging and rewarding. You'll need to understand the package's code and dependencies, make sure it builds and works correctly, and respond to any issues or pull requests that come up. This process can be a great learning experience, as you'll be exposed to a wide variety of programming languages and libraries.

Moreover, by adopting an orphaned package, you'll be making a tangible impact on the NixOS community. Your contributions will be greatly appreciated by users who depend on that package, and you'll be helping to ensure that NixOS releases are as stable and up-to-date as possible.

Closing

This is a great way to help NixOS, and it is a great time for new contributors to start their nixpkgs adventure. 🥳

As with the feature freeze, please keep the discussion here to a minimum so we don't ping all maintainers (although relevant comments can of course be added here if they are directly ZHF-related) and ping one of the release managers (@RossComputerGuy, @wegank) in the respective issues.

@RossComputerGuy RossComputerGuy pinned this issue Nov 1, 2024
@FliegendeWurst FliegendeWurst added 0.kind: build failure A package fails to build 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems labels Nov 1, 2024
@pbsds pbsds mentioned this issue Nov 1, 2024
13 tasks
Ma27 added a commit to Ma27/nixpkgs that referenced this issue Nov 1, 2024
ZHF NixOS#352882

Doesn't compile with PHP 8.3: https://hydra.nixos.org/build/276605925

We actually want to use the `couchbase-php-client`[1] repo. I briefly
tried to package it, but given that I don't care a bit about this
specific extension and it was far too annoying (vendored C++ libraries,
.gitattributes removing CMake files from the GitHub tarball, a random
CMake "package manager" is used) I decided to not bother.

If nobody steps up, I'd suggest to throw it out when PHP 8.2 becomes
EOL.

[1] https://github.com/couchbase/couchbase-php-client/
@RossComputerGuy
Copy link
Member Author

release-24.11 has been branched off so remember to also add the backport release-24.11 to your Pull Requests 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems 6.topic: release process Issues or PRs which are parts of the NixOS release process
Projects
None yet
Development

No branches or pull requests

3 participants