[DDW-1227] Fix out-of-memory errors on ci.iog.io #3145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We’re OOM-ing on https://ci.iog.io/, and therefore have cache misses – developers have to build devshells locally (slow), instead of downloading them from the cache. Let’s reduce the memory footprint of the evaluation
This PR fixes that by reducing the number of times we evaluate Nixpkgs. After the changes, they'll only be evaluated once per each target system. Previously they were evaluated once per each pair of Cardano network and target system (i.e. for each installer), and also multiple times for devshells (we have separate devshells for each Cardano network).
IMO, it doesn’t require a QA run, since it has no functional changes, just build changes (and not significant ones)
You can see that it is a safe transformation in terms of the actual builds, because:
cluster
parameter down 1 level (previously we hadinternal.x86_64-windows.mainnet.unsignedInstaller
, now we haveinternal.x86_64-windows.unsignedInstaller.mainnet
) – this is done by wrapping some attrs withgenCluster (cluster: …)
, and later referencing them with the suffix.${cluster}
,newCommon
→common
,daedalusPkgs
→common
,old-default.nix
has been moved tocommon.nix
,old-shell.nix
has been renamed todevshells.nix
and it now takespkgs
andcommon
frominputs.self.internal.*
, preventing previous reevaluationsYou can also see that it worked here: https://ci.iog.io/build/598723#tabs-constituents
Todos
n/a
Screenshots
n/a
Testing Checklist
Review Checklist
Basics
input-output-hk/daedalus-dev
andinput-output-hk/daedalus-qa
assigned as PR reviewersrelease-vNext
,feature
/bug
/chore
,WIP
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review