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

Improve speed of tests #133

Merged
merged 3 commits into from
Mar 7, 2024
Merged

Improve speed of tests #133

merged 3 commits into from
Mar 7, 2024

Conversation

srid
Copy link
Member

@srid srid commented Mar 7, 2024

Running nixci on my mac is extremely slow mainly due to grafana build. The slowness also translates to all of CI platforms.

Tests should run swiftly as possible. Our project is not complicated. If something's fucked in nixpkgs, we shouldn't have to get hit by slow build times.

@srid srid changed the title Multiple things Improve speed of tests Mar 7, 2024
Other platforms need not unnecessarily build these packages
@shivaraj-bh
Copy link
Member

We can improve the build time by disabling check for grafana instead.

@srid
Copy link
Member Author

srid commented Mar 7, 2024

disabling check for grafana instead

I tried that, it was still taking a while to build locally.

These broken packages should be a temp issue, so I'd say let's just use older nixpkgs until they fix it upstream. We benefit from official cache.

@srid
Copy link
Member Author

srid commented Mar 7, 2024

Also less code is generally better. We don't want to maintain our own $package derivations. That's nixpkgs' job.


# grafana is broken on aarch64-darwin, but works on older nixpkgs:
# https://github.com/NixOS/nixpkgs/issues/273998
grafana = (builtins.getFlake "github:nixos/nixpkgs/b604023e0a5549b65da3040a07d2beb29ac9fc63").legacyPackages.${system}.grafana;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one line: we don't even have to add an extra flake input.

@shivaraj-bh
Copy link
Member

Okay, I will fix it upstream then.

@srid srid marked this pull request as ready for review March 7, 2024 20:06
srid added 2 commits March 7, 2024 15:07
This speeds up build, because we no longer have to compile grafana locally and wait for eternity.

cf. NixOS/nixpkgs#273998
We don't need per-file package overlays, since we don't envision having too many of them. Whenever possible, get them from nixpkgs, to keep our tests nimble.
@srid srid merged commit 3e849aa into main Mar 7, 2024
4 checks passed
@srid srid deleted the srid-multi branch March 7, 2024 20:08
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.

2 participants