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

Bring back constituents to Hydra #340

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

Ericson2314
Copy link
Contributor

This is a commit from @Ma27 https://git.lix.systems/ma27/nix-eval-jobs/commit/5ce92e2c4d318b30edaafa4d8664b9e15e941f32 I rebased. Thanks @Ma27!

This (or something like it) is needed for nix-eval-jobs to replace hydra-eval-jobs.


The part about finding _hydraAggregate/constituents is basically derived from hydra-eval-jobs, however the part about namedConstituents has been changed: we still stream out jobs when they appear, however we suppress this for aggregate jobs.

These jobs are post-processed at the end, i.e. if namedConstituents exist, these will be mapped to the drvPath of the other jobs. Then, the drv will be rewritten to contain the drvPath of said jobs[1] and the JSON containing the rewritten drvPath will be printed out.

[1] This was an optimization to reduce the memory footprint of
evaluating e.g. the tested job in nixpkgs.

(cherry picked from commit 76f32ed29e25b22d69467d28b72efcc9ac22e1bf)

The part about finding `_hydraAggregate`/`constituents` is basically
derived from `hydra-eval-jobs`, however the part about
`namedConstituents` has been changed: we still stream out jobs when they
appear, however we suppress this for aggregate jobs.

These jobs are post-processed at the end, i.e. if `namedConstituents`
exist, these will be mapped to the drvPath of the other jobs. Then, the
drv will be rewritten to contain the drvPath of said jobs[1] and the
JSON containing the rewritten `drvPath` will be printed out.

[1] This was an optimization to reduce the memory footprint of
    evaluating e.g. the `tested` job in nixpkgs.

(cherry picked from commit 76f32ed29e25b22d69467d28b72efcc9ac22e1bf)
Ericson2314 pushed a commit to NixOS/hydra that referenced this pull request Nov 25, 2024
@Mic92 Mic92 merged commit 2c36b37 into nix-community:main Nov 25, 2024
16 checks passed
@Ericson2314 Ericson2314 deleted the aggregate-jobs branch November 25, 2024 17:12
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.

3 participants