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

Hydra fails at runtime due to buildPerlPackage changes #72783

Closed
lopsided98 opened this issue Nov 4, 2019 · 8 comments
Closed

Hydra fails at runtime due to buildPerlPackage changes #72783

lopsided98 opened this issue Nov 4, 2019 · 8 comments
Assignees
Milestone

Comments

@lopsided98
Copy link
Contributor

Describe the bug

Hydra fails at runtime due to missing transitive dependencies. This occurs because 9e60fef removed nix-support/propagated-user-env-packages from all Perl packages. Hydra uses buildEnv to create an environment with all its Perl packages, and propagated-user-env-packages used to cause all the transitive dependencies to be pulled into the environment, but this no longer happens.

As suggested by @conferno, I tried replacing buildEnv with perl.withPackages, but this does not work because the Perl wrapper clobbers PERL5LIB, which prevents Hydra from adding its own Perl files to PERL5LIB.

To Reproduce
Steps to reproduce the behavior:

nix-build nixos/tests/hydra

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - hydra
# a list of nixos modules affected by the problem
module:
  - hydra

cc @volth @Ma27

lopsided98 referenced this issue Nov 4, 2019
It has no effect since system-wide $PERL5LIB removed more than an year ago
@Ma27 Ma27 self-assigned this Nov 5, 2019
@Ma27
Copy link
Member

Ma27 commented Nov 5, 2019

The overall issue might be solved in the Perl infrastructure of nixpkgs, however I experienced exactly this when I prepared a Hydra bump last weekend (but lacked time to dig in). I'll prepare a PR to unbreak Hydra now, but don't have a strong opinion about how to fix this perl-wide.

@lopsided98
Copy link
Contributor Author

rt might have the same problem. I'm not sure if all transitive dependencies are explicitly included there.

@Ma27
Copy link
Member

Ma27 commented Nov 8, 2019

Thanks a lot for the insights @volth!

The list of hydra's perl deps looks crafted manually including all transitive dependencies. As the time went on, the list got out of sync but nothing was broken, because buildEnv magically resolved perl dependencies, silently inserting missing ones. It might be nice, but the implicit magic is confusing. It resolves perl dependencies, but not python's, not ruby's, not lua'a

I actually tried to add all transitive perl dependencies of Hydra, but this escalated pretty quickly and I decided that this isn't a feasible approach since tracking the entire dependency graph makes the package IMHO rather hard to maintain.

the code below should restore old behavior (just by adding a single word instead of ~10 lines on bash which also shadowed postFixup defined in buildPerlPackage), also being language-independent and giving an explicit hint of what is going on:

Agreed. This revert would cause a pretty big rebuild and I just don't think that's worth the effort.

IMHO it would be fine to add lib.closePropagation to automatically resolve all paths for now (to get Hydra fixed on master). Sooner or later someone (probably me as package-maintainer 😅 ) should take a closer look at the dependency-list to clean up outdated stuff.

As release isn't affected I'd also be fine to wait until the third solution works fine for us though.

dhess added a commit to dhess/dhess-nix that referenced this issue Nov 13, 2019
@FRidh FRidh added this to the 20.03 milestone Nov 16, 2019
dguibert added a commit to dguibert/hydra that referenced this issue Dec 12, 2019
duairc added a commit to duairc/nixpkgs that referenced this issue Dec 16, 2019
…tion

Hydra fails to start on recent recent nixpkgs due to a change in Perl packaging: this has been reported in NixOS#72783. @conferno in that thread suggested using lib.closePropagation as a fix, which is apparently deprecated, but works for now.
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this issue Feb 2, 2020
…tion

Hydra fails to start on recent recent nixpkgs due to a change in Perl packaging: this has been reported in NixOS#72783. @conferno in that thread suggested using lib.closePropagation as a fix, which is apparently deprecated, but works for now.

(cherry picked from commit 8acf340)
stigtsp added a commit to stigtsp/nixpkgs that referenced this issue Feb 20, 2020
ZHF: NixOS#80379
https://hydra.nixos.org/build/113061284

Added requiredPerlModules as suggested for similar problem as described for
similar problem here:
NixOS#72783 (comment)
@stigtsp stigtsp mentioned this issue Feb 20, 2020
10 tasks
jonringer pushed a commit that referenced this issue Mar 20, 2020
ZHF: #80379
https://hydra.nixos.org/build/113061284

Added requiredPerlModules as suggested for similar problem as described for
similar problem here:
#72783 (comment)
mmilata pushed a commit to mmilata/nixpkgs that referenced this issue Mar 28, 2020
ZHF: NixOS#80379
https://hydra.nixos.org/build/113061284

Added requiredPerlModules as suggested for similar problem as described for
similar problem here:
NixOS#72783 (comment)

(cherry picked from commit 3e50e26)
@Ma27
Copy link
Member

Ma27 commented Mar 31, 2020

This should be fixed, at least with #83600 or probably even earlier. I'm currently running Hydra on 20.03 without any issues now. If you encounter further issues, feel free to ping me to reopen!

@Ma27 Ma27 closed this as completed Mar 31, 2020
stigok pushed a commit to stigok/nixpkgs that referenced this issue Jun 12, 2020
ZHF: NixOS#80379
https://hydra.nixos.org/build/113061284

Added requiredPerlModules as suggested for similar problem as described for
similar problem here:
NixOS#72783 (comment)

(cherry picked from commit 3e50e26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@FRidh @lopsided98 @Ma27 and others