Skip to content

[eval symlinks] eval symlinks in print-dev-env #1777

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

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Conversation

savil
Copy link
Collaborator

@savil savil commented Feb 3, 2024

Summary

On MacOS, in nix 2.20, I am seeing the following error with the global_add testscript. This also repros in CICD:

 Error: Command: /nix/var/nix/profiles/default/bin/nix print-dev-env /var/folders/zv/r3sx92_94gq86_rq3yn1ky2h0000gn/T/TestScripts3021118989/001/.local/share/devbox/global/default/.devbox/gen/flake --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --json: exit status 1

        2024/02/02 16:44:15 Command stderr: error (ignored): error: end of string reached
        error:
               … while fetching the input 'path:/var/folders/zv/r3sx92_94gq86_rq3yn1ky2h0000gn/T/TestScripts3021118989/001/.local/share/devbox/global/default/.devbox/gen/flake'

               error: path '«unknown»/var' is a symlink

I'm not sure why this is now failing. Possibly (but low confidence) as a side-effect of this nix PR NixOS/nix@83c067c. Not sure if its intentional or not.

To workaround this, I am preemptively calling EvalSymlink in our golang prior to invoke nix print-dev-env.

How was it tested?

CICD run including our MacOS tests:
https://github.com/jetpack-io/devbox/actions/runs/7763452308

NOTE: I manually cancelled the run below in this PR, so the above CICD including MacOS could run.

Copy link
Collaborator Author

savil commented Feb 3, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@savil savil requested a review from mikeland73 February 3, 2024 01:32
@savil savil marked this pull request as ready for review February 3, 2024 01:32
Copy link
Contributor

@mikeland73 mikeland73 left a comment

Choose a reason for hiding this comment

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

That's kind of a big breaking change if they did in fact make it so you can't use symlinks as paths.

Anyway, this is pretty log risk so let's do it.

Unit tests FTW

@savil savil merged commit b390352 into main Feb 4, 2024
@savil savil deleted the savil/eval-symlinks branch February 4, 2024 21:10
Copy link

sentry-io bot commented Feb 5, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ **syscall.Errno: <redacted errors.withStack>: <redacted fs.PathError>: go.jetpack.io/devbox/internal/nix in (*Nix).Pri... View Issue

Did you find this useful? React with a 👍 or 👎

@gcurtis gcurtis linked an issue Feb 27, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Fix glibc-patch/flake.nix build
2 participants