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

[Backport release-24.11] Parallel GH actions workflow for Nixpkgs eval #357652

Merged
merged 5 commits into from
Nov 23, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 20, 2024

Bot-based backport to release-24.11, triggered by a label in #356023.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-commiter, if you find that it is not acceptable, leave a comment.

…ttrNamesOnly

The attrNamesOnly feature is used by
pkgs/top-level/release-attrpaths-superset.nix to return a superset of
all attributes that might be built by Hydra.

Before this change it would include all attribute paths to derivations that could
be found recursively, ignoring the recurseForDerivations and
recurseForRelease attributes that control Hydra's recursion.

This had the effect that it would end up with ~266000 attributes, most of which definitely won't be built by Hydra. We can remove those while staying true to the superset notion to end up with just ~97000, a reduction of ~63.6%! This also comes with an eval time reduction from 31.7s to 18.7s (-41.0%)!

As an example, all derivations in pypy310Packages don't get included
anymore, because it doesn't have a `.recurseForDerivations` set.

As a nice side effect, with `--arg enableWarnings false`, no more
warnings are printed, because things like
`checkpointBuildTools.mkCheckpointedBuild` (which is deprecated) isn't
being recursed to anymore.

(cherry picked from commit 72f462b)
Motivated by ofborg struggling [1] and its evaluations taking too long,
inspired by Jörg's initial PR [2]
and Adam's previous attempt to parallelise Nixpkgs evaluation [3],
this PR contains initial work to relief ofborg from its evaluation duty
by using GitHub Actions to evaluate Nixpkgs.

For now this doesn't take care of all of what ofborg does, such as
requesting appropriate reviewers or labeling mass rebuilds, but this can
be follow-up work.

[1]: https://discourse.nixos.org/t/infrastructure-announcement-the-future-of-ofborg-your-help-needed/56025?u=infinisil
[2]: #352808
[3]: #269403

Co-Authored-By: Jörg Thalheim <[email protected]>
Co-Authored-By: Adam Joseph <[email protected]>
(cherry picked from commit fbbe972)
@Mic92
Copy link
Member

Mic92 commented Nov 21, 2024

This should now also contain the follow up fixes otherwise it's misleading as it tests the wrong commit.

@Mic92
Copy link
Member

Mic92 commented Nov 21, 2024

#357965

azuwis and others added 3 commits November 23, 2024 19:33
Although matrix.system is supposed to be generated from trusted code,
we'd better follow [Github Actions good practices][1].

[1]: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable

(cherry picked from commit f807208)
- `env.mergedSha` is empty, so it checked out the master version by
default
- The process step used `needs.attrs.outputs.mergedSha`, but apparently
  that's empty unless `attrs` is declared as a `needs`, even though
  `outputs` implicitly depends on `attrs`

(cherry picked from commit 19db54e)
@JohnRTitor JohnRTitor merged commit 65605fd into release-24.11 Nov 23, 2024
7 of 10 checks passed
@JohnRTitor JohnRTitor deleted the backport-356023-to-release-24.11 branch November 23, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants