Skip to content

Conversation

@TomaSajt
Copy link
Contributor

@TomaSajt TomaSajt commented Apr 22, 2025

Fixes #397309
Supersedes: #400738

This PR moves over to using concurrent.futures.ThreadPoolExecutor instead of multiprocessing.Pool because we can properly do some fail-early logic with ThreadPoolExecutor.

Also, add timeout=(a,b) to session.get calls, so that we never deadlock the fetcher.
I also lowered the Retry object's retry count down to 3.


Note: even though this only touches the FOD part of fetchCargoVendor, this file is used by the non-FOD part as well, so we'll get rebuilds :/

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Apr 22, 2025
@TomaSajt TomaSajt requested a review from Defelo April 22, 2025 14:48
@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 22, 2025
Copy link
Member

@Defelo Defelo left a comment

Choose a reason for hiding this comment

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

Tested this on a few packages, LGTM so far. But this should probably go to staging instead of master, right?

@FliegendeWurst FliegendeWurst changed the base branch from master to staging April 23, 2025 13:27
@TomaSajt
Copy link
Contributor Author

TomaSajt commented Apr 24, 2025

I had to request a review manually, because it seems like the ci/OWNERS file is not cascading.

nixpkgs/ci/OWNERS

Lines 194 to 195 in 451aea4

/pkgs/build-support/rust @zowoq @winterqt @figsoda
/pkgs/build-support/rust/fetch-cargo-vendor* @TomaSajt

The others should probably also be added to the second line in the linked section above.

(Or maybe the easiest thing would be for me to just add myself as an owner for the whole of build-support/rust)

@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fetchCargoVendor: no http request timeout

3 participants