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

Reapply "build(deps): bump cachix/install-nix-action from 30 to 31" #391347

Merged

Conversation

wolfgangwalther
Copy link
Contributor

This was reverted in #390695, more discussion over there.

I was not able to reproduce the problem locally, but easily in my own fork by re-applying the commit:
https://github.com/wolfgangwalther/nixpkgs/actions/runs/13953151439/job/39057945183

I then applied the fix as suggested by @Mic92 in #390695 (comment). This fixed it.

I also double-checked, the other uses of builtins.fromJSON (as well as builtins.readFile) in the ci-code are not going to deal with store paths, this is the only case.

Thus, it should be safe to re-apply this again.

Things done


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion backport release-24.11 Backport PR automatically labels Mar 19, 2025
@wolfgangwalther wolfgangwalther force-pushed the ci-install-nix-action-31 branch from 3b103b9 to f007f20 Compare March 19, 2025 18:23
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Mar 19, 2025
Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

Suggestion on adding some documentation about "why" here.

This suddenly appeared after updating Nix to v26, which then complained:

… while calling the 'fromJSON' builtin
  at
/home/runner/work/nixpkgs/nixpkgs/target/ci/eval/compare/default.nix:74:19:
    73|
    74|   getAttrs = dir: builtins.fromJSON (builtins.readFile
"${dir}/outpaths.json");
      |                   ^
    75|   beforeAttrs = getAttrs beforeResultDir;

… while evaluating the first argument passed to builtins.fromJSON

error: the string '{
  "AMB-plugins.aarch64-linux": {
    "out":
"/nix/store/faw59ba5p6h4b177n8q2ilb3hlm7xlc2-AMB-plugins-0.8.1"
  },
                  ....
  "zzuf.aarch64-linux": {
    "out": "/nix/store/bqvm1h7jfd8smgnjc1v1gpmbwdgvwy5g-zzuf-0.15"
  },
  "zzuf.x86_64-linux": {
    "out": "/nix/store/6qs4lnmzn1qlr3smqqxnmhnrcdcfiv6a-zzuf-0.15"
  }
}
' is not allowed to refer to a store path (such as
'134m2q047vsr9miwh5l227j7sh9jb130-jq-1.7.1-bin')

By discard the unsafe string context, we explicitly allow loading those
store paths. It's unclear why this blew up now, especially because I was
not possible to consistently replicate this locally, so far.
@wolfgangwalther wolfgangwalther force-pushed the ci-install-nix-action-31 branch from f007f20 to 3fa48f3 Compare March 19, 2025 19:38
@wegank wegank added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Mar 20, 2025
@wolfgangwalther wolfgangwalther merged commit 3f3d4c4 into NixOS:master Mar 21, 2025
30 checks passed
@wolfgangwalther wolfgangwalther deleted the ci-install-nix-action-31 branch March 21, 2025 17:01
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Mar 21, 2025

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 2 This PR was reviewed and approved by two reputable people backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants