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

Feat: add support for multi-systems #419

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Conversation

GaetanLepage
Copy link
Contributor

@GaetanLepage GaetanLepage commented Sep 22, 2024

This PR addresses #400 by allowing to evaluate a PR/revision for multiple systems at once.
You can now provide the --systems option with a list of systems to evaluate:

  • --systems current (default): legacy behavior
  • --systems "x86_64-linux aarch64-darwin": evaluate for both intel linux and ARM darwin
  • --systems all: evaluate on all four main platforms

Progress

  • Overall refactoring, addition of the necessary abstractions
  • Adapted all "output" features (report.json, report.md, stdout...)
  • Support for --eval ofborg
  • Support for --eval local (sequential)
  • Support for --eval local (optionally parallel) -> Let's do this in a following PR. This one is already big enough.
  • Flesh out documentation
  • Final code polishing

Note

This is still a WIP. The tool works fine when using ofborg eval but I have not yet adapted to local evaluation.
The code is quite dirty for now and will require more polish once everything will be working.
Also, I am fully open to suggestions regarding the solution and coding style.

I am eager to receive some feedback !

Technical details

  • Basically, adding this feature requires a pretty heavy refactoring.
    Every place where there was a list of attributes/packages/reports, we now need a dict mapping each system to this list.
  • I also needed to change the code for the nix shell to build as it now combines the packages to build for all platforms in the final attribute list.
  • The current --system option has been softly deprecated (warning + forwarding the value to --systems) to avoid breaking the workflow of existing users.
  • Note: I also had to change the layout of the report.json.

cc @Mic92 @natsukium

@Mic92
Copy link
Owner

Mic92 commented Sep 23, 2024

Changing report.json will need changes in nipkgs-update as well.

@Mic92
Copy link
Owner

Mic92 commented Sep 23, 2024

From the code it looks like you handle local evaluation as well, no?

@GaetanLepage
Copy link
Contributor Author

From the code it looks like you handle local evaluation as well, no?

No, the build_commit method of Review is broken and has not been adapted.

@GaetanLepage
Copy link
Contributor Author

I have a sequential version working for --eval local.
Basically, it calls nix-env for each system, one after the other.
We could work on calling them all in parallel, but we would need to provide an option as having 4 of them simultaneously requires a lot of RAM (sometimes even 64GB is not enough).

@GaetanLepage
Copy link
Contributor Author

GaetanLepage commented Sep 23, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 342734


x86_64-linux

⏩ 2 packages marked as broken and skipped:
  • python311Packages.bambi
  • python311Packages.bambi.dist
✅ 16 packages built:
  • python311Packages.arviz
  • python311Packages.arviz.dist
  • python311Packages.corner
  • python311Packages.corner.dist
  • python311Packages.flowmc
  • python311Packages.flowmc.dist
  • python311Packages.numpyro
  • python311Packages.numpyro.dist
  • python311Packages.pymc
  • python311Packages.pymc.dist
  • python312Packages.arviz
  • python312Packages.arviz.dist
  • python312Packages.corner
  • python312Packages.corner.dist
  • python312Packages.numpyro
  • python312Packages.numpyro.dist

aarch64-linux

⏩ 2 packages marked as broken and skipped:
  • python311Packages.bambi
  • python311Packages.bambi.dist
✅ 14 packages built:
  • python311Packages.arviz
  • python311Packages.arviz.dist
  • python311Packages.corner
  • python311Packages.corner.dist
  • python311Packages.numpyro
  • python311Packages.numpyro.dist
  • python311Packages.pymc
  • python311Packages.pymc.dist
  • python312Packages.arviz
  • python312Packages.arviz.dist
  • python312Packages.corner
  • python312Packages.corner.dist
  • python312Packages.numpyro
  • python312Packages.numpyro.dist

x86_64-darwin

⏩ 16 packages marked as broken and skipped:
  • python311Packages.arviz
  • python311Packages.arviz.dist
  • python311Packages.bambi
  • python311Packages.bambi.dist
  • python311Packages.corner
  • python311Packages.corner.dist
  • python311Packages.numpyro
  • python311Packages.numpyro.dist
  • python311Packages.pymc
  • python311Packages.pymc.dist
  • python312Packages.arviz
  • python312Packages.arviz.dist
  • python312Packages.corner
  • python312Packages.corner.dist
  • python312Packages.numpyro
  • python312Packages.numpyro.dist

aarch64-darwin

⏩ 6 packages marked as broken and skipped:
  • python311Packages.bambi
  • python311Packages.bambi.dist
  • python311Packages.flowmc
  • python311Packages.flowmc.dist
  • python311Packages.pymc
  • python311Packages.pymc.dist
❌ 8 packages failed to build:
  • python311Packages.arviz
  • python311Packages.arviz.dist
  • python311Packages.corner
  • python311Packages.corner.dist
  • python312Packages.arviz
  • python312Packages.arviz.dist
  • python312Packages.corner
  • python312Packages.corner.dist
✅ 4 packages built:
  • python311Packages.numpyro
  • python311Packages.numpyro.dist
  • python312Packages.numpyro
  • python312Packages.numpyro.dist

nixpkgs_review/nix.py Outdated Show resolved Hide resolved
nixpkgs_review/nix.py Outdated Show resolved Hide resolved
nixpkgs_review/report.py Outdated Show resolved Hide resolved
nixpkgs_review/review.py Outdated Show resolved Hide resolved
nixpkgs_review/report.py Outdated Show resolved Hide resolved
nixpkgs_review/review.py Outdated Show resolved Hide resolved
nixpkgs_review/report.py Outdated Show resolved Hide resolved
nixpkgs_review/report.py Outdated Show resolved Hide resolved
@GaetanLepage GaetanLepage force-pushed the multi-systems branch 4 times, most recently from 7e3fd1e to bd89a3e Compare September 23, 2024 14:05
@GaetanLepage GaetanLepage force-pushed the multi-systems branch 2 times, most recently from c287a18 to 0e18138 Compare September 24, 2024 08:21
README.md Outdated Show resolved Hide resolved
@GaetanLepage GaetanLepage force-pushed the multi-systems branch 2 times, most recently from 0468ea9 to 6549f1d Compare September 25, 2024 12:24
@GaetanLepage GaetanLepage requested a review from Mic92 September 30, 2024 09:57
@GaetanLepage GaetanLepage changed the title [WIP] Feat: add support for multi-systems Feat: add support for multi-systems Oct 1, 2024
@Mic92 Mic92 merged commit 53e593d into Mic92:master Oct 2, 2024
3 checks passed
@GaetanLepage GaetanLepage deleted the multi-systems branch October 2, 2024 07:32
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